Skip to content

Commit 050a877

Browse files
committed
fix(parser): Store the location of the if-token in the AST
1 parent 727a600 commit 050a877

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cxx/parser.cc

+2
Original file line numberDiff line numberDiff line change
@@ -2872,6 +2872,8 @@ bool Parser::parse_if_statement(StatementAST*& yyast) {
28722872
auto ast = new (pool) IfStatementAST();
28732873
yyast = ast;
28742874

2875+
ast->ifLoc = ifLoc;
2876+
28752877
const auto has_constexpr = match(TokenKind::T_CONSTEXPR, ast->constexprLoc);
28762878

28772879
expect(TokenKind::T_LPAREN, ast->lparenLoc);

0 commit comments

Comments
 (0)