mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-09 08:28:43 +00:00
changes for new grammar, fixes
This commit is contained in:
parent
3106a64949
commit
f912cdac41
10 changed files with 59 additions and 5 deletions
|
|
@ -167,6 +167,14 @@ void BuildVisitor::Visit(VariableDefinitionStatement* node) {
|
|||
// error
|
||||
}
|
||||
|
||||
size_t child_count = parse_node.NamedChildCount();
|
||||
|
||||
if (child_count > 2) { // name, value [, in_expression]
|
||||
current_node_ = parse_node.ChildByFieldName("in_expression");
|
||||
node->in_expression.emplace();
|
||||
Visit(node->in_expression.value());
|
||||
}
|
||||
|
||||
current_node_ = parse_node;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue