Skip to main content

Module parser_parse_if

Module parser_parse_if 

Source
Expand description

Node: cxx:Method:Luau.Ast:Ast/src/Parser.cpp:559:parseIf

Faithful port of Parser::parseIfif exp then block {elseif/else} end. Chained elseif recurses through parse_if (guarded by the recursion counter); a trailing else is parsed as a block whose begin is snapped to the else keyword. hasEnd is propagated onto whichever block terminates the chain so the pretty-printer / CST consumers see the real end span.