Skip to main content

Module parser_parse_for

Module parser_parse_for 

Source
Expand description

Node: cxx:Method:Luau.Ast:Ast/src/Parser.cpp:726:parseFor

Faithful port of Parser::parseFor — both numeric for i = a, b [, c] do and generic for a, b in exprs do loops. The first binding is parsed before the =/in is known; numeric loops push the single control variable, while generic loops parse a binding list and an expression list, copying both into arena AstArrays for AstStatForIn. CST positions (commas / = / colon annotations) are recorded only under store_cst_data.