[ { "Label": "standard_numeric", "Input": "for i = 1, 100 do end", "AST": { "Type": "Block", "Range": { "Start": 0, "End": 21 }, "Stmts": [ { "Type": "ForStatement", "Range": { "Start": 0, "End": 21 }, "Name": { "Type": "Identifier", "Range": { "Start": 4, "End": 5 }, "Literal": "i" }, "Start": { "Type": "NumberLiteral", "Range": { "Start": 8, "End": 9 }, "Literal": "1", "Value": 1 }, "Finish": { "Type": "NumberLiteral", "Range": { "Start": 11, "End": 14 }, "Literal": "100", "Value": 100 }, "Step": null, "Body": { "Type": "Block", "Range": { "Start": 18, "End": 18 }, "Stmts": [] } } ] } }, { "Label": "stepped_numeric", "Input": "for i = 1, 100, 5 do end", "AST": { "Type": "Block", "Range": { "Start": 0, "End": 24 }, "Stmts": [ { "Type": "ForStatement", "Range": { "Start": 0, "End": 24 }, "Name": { "Type": "Identifier", "Range": { "Start": 4, "End": 5 }, "Literal": "i" }, "Start": { "Type": "NumberLiteral", "Range": { "Start": 8, "End": 9 }, "Literal": "1", "Value": 1 }, "Finish": { "Type": "NumberLiteral", "Range": { "Start": 11, "End": 14 }, "Literal": "100", "Value": 100 }, "Step": { "Type": "NumberLiteral", "Range": { "Start": 16, "End": 17 }, "Literal": "5", "Value": 5 }, "Body": { "Type": "Block", "Range": { "Start": 21, "End": 21 }, "Stmts": [] } } ] } }, { "Label": "reverse_numeric", "Input": "for i = 100, -1, -2 do end", "AST": { "Type": "Block", "Range": { "Start": 0, "End": 26 }, "Stmts": [ { "Type": "ForStatement", "Range": { "Start": 0, "End": 26 }, "Name": { "Type": "Identifier", "Range": { "Start": 4, "End": 5 }, "Literal": "i" }, "Start": { "Type": "NumberLiteral", "Range": { "Start": 8, "End": 11 }, "Literal": "100", "Value": 100 }, "Finish": { "Type": "PrefixExpression", "Range": { "Start": 13, "End": 15 }, "Operator": "minus", "Right": { "Type": "NumberLiteral", "Range": { "Start": 14, "End": 15 }, "Literal": "1", "Value": 1 } }, "Step": { "Type": "PrefixExpression", "Range": { "Start": 17, "End": 19 }, "Operator": "minus", "Right": { "Type": "NumberLiteral", "Range": { "Start": 18, "End": 19 }, "Literal": "2", "Value": 2 } }, "Body": { "Type": "Block", "Range": { "Start": 23, "End": 23 }, "Stmts": [] } } ] } }, { "Label": "generic_pairs", "Input": "for key, value in pairs({}) do end", "AST": { "Type": "Block", "Range": { "Start": 0, "End": 34 }, "Stmts": [ { "Type": "ForInStatement", "Range": { "Start": 0, "End": 34 }, "Names": [ { "Type": "Identifier", "Range": { "Start": 4, "End": 7 }, "Literal": "key" }, { "Type": "Identifier", "Range": { "Start": 9, "End": 14 }, "Literal": "value" } ], "Exps": [ { "Type": "FunctionCall", "Range": { "Start": 18, "End": 27 }, "Left": { "Type": "Identifier", "Range": { "Start": 18, "End": 23 }, "Literal": "pairs" }, "Args": [ { "Type": "TableLiteral", "Range": { "Start": 24, "End": 26 }, "Fields": [], "StartPos": 24 } ] } ], "Body": { "Type": "Block", "Range": { "Start": 31, "End": 31 }, "Stmts": [] } } ] } }, { "Label": "generic_five_values", "Input": "for first, second, third, fourth, fifth in some_iterable_variable do end", "AST": { "Type": "Block", "Range": { "Start": 0, "End": 72 }, "Stmts": [ { "Type": "ForInStatement", "Range": { "Start": 0, "End": 72 }, "Names": [ { "Type": "Identifier", "Range": { "Start": 4, "End": 9 }, "Literal": "first" }, { "Type": "Identifier", "Range": { "Start": 11, "End": 17 }, "Literal": "second" }, { "Type": "Identifier", "Range": { "Start": 19, "End": 24 }, "Literal": "third" }, { "Type": "Identifier", "Range": { "Start": 26, "End": 32 }, "Literal": "fourth" }, { "Type": "Identifier", "Range": { "Start": 34, "End": 39 }, "Literal": "fifth" } ], "Exps": [ { "Type": "Identifier", "Range": { "Start": 43, "End": 65 }, "Literal": "some_iterable_variable" } ], "Body": { "Type": "Block", "Range": { "Start": 69, "End": 69 }, "Stmts": [] } } ] } } ]