| ... | ... | @@ -76,11 +76,13 @@ static AstNode *ast_create_node_no_line_info(ParseContext *pc, NodeType type) { |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | static void ast_update_node_line_info(AstNode *node, Token *first_token) { |
| 79 | assert(first_token); |
| 79 | 80 | node->line = first_token->start_line; |
| 80 | 81 | node->column = first_token->start_column; |
| 81 | 82 | } |
| 82 | 83 | |
| 83 | 84 | static AstNode *ast_create_node(ParseContext *pc, NodeType type, Token *first_token) { |
| 85 | assert(first_token); |
| 84 | 86 | AstNode *node = ast_create_node_no_line_info(pc, type); |
| 85 | 87 | ast_update_node_line_info(node, first_token); |
| 86 | 88 | return node; |
| ... | ... | @@ -1541,6 +1543,7 @@ static AstNode *ast_parse_while_expr(ParseContext *pc, size_t *token_index, bool |
| 1541 | 1543 | return nullptr; |
| 1542 | 1544 | } |
| 1543 | 1545 | } else if (first_token->id == TokenIdKeywordWhile) { |
| 1546 | while_token = first_token; |
| 1544 | 1547 | is_inline = false; |
| 1545 | 1548 | *token_index += 1; |
| 1546 | 1549 | } else if (mandatory) { |