mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-10 08:58:45 +00:00
fixes, new examples
This commit is contained in:
parent
823fa30fa8
commit
7f4266821c
15 changed files with 322 additions and 74 deletions
|
|
@ -924,8 +924,7 @@ void BuildVisitor::Visit(ReferenceExpression* node) {
|
|||
}
|
||||
|
||||
current_node_ = parse_node.ChildByFieldName("expression");
|
||||
node->expression = std::make_unique<ScopedStatement>();
|
||||
Visit(node->expression.get());
|
||||
Visit(node->expression);
|
||||
|
||||
current_node_ = parse_node;
|
||||
}
|
||||
|
|
@ -1053,7 +1052,8 @@ void BuildVisitor::Visit(TypeConstructorParameter* node) {
|
|||
size_t child_count = parse_node.NamedChildCount();
|
||||
|
||||
if (child_count > 1) {
|
||||
node->name = parse_node.ChildByFieldName("name").GetValue();
|
||||
current_node_ = parse_node.ChildByFieldName("name");
|
||||
node->name = current_node_.GetValue();
|
||||
|
||||
std::string assignment_modifier = current_node_.NextSibling().GetValue();
|
||||
if (assignment_modifier == "=") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue