JSSpecCompiler: Make nodes inherit from Statement or Expression

The distinction between them will become important during CFG building.
This commit is contained in:
Dan Klishch 2023-08-19 14:05:36 -04:00 committed by Andrew Kaster
parent ed5ef4da6d
commit 326bac19d9
Notes: sideshowbarker 2024-07-17 07:19:27 +09:00
5 changed files with 37 additions and 25 deletions

View file

@ -306,7 +306,7 @@ ParseErrorOr<Tree> TextParser::parse_return_statement()
auto return_value = TRY(parse_expression());
rollback.disarm();
return make_ref_counted<ReturnExpression>(return_value);
return make_ref_counted<ReturnNode>(return_value);
}
// assert: <condition>