Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix errors #127

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions src/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ auto DonsusParser::donsus_variable_definition(
donsus_parser_next();
parse_result expression = donsus_expr(0);
declaration->children.push_back(expression);
donsus_parser_except(DONSUS_SEMICOLON);
donsus_parser_except_current(DONSUS_SEMICOLON);
return declaration;
}

Expand Down Expand Up @@ -1518,7 +1518,7 @@ auto DonsusParser::donsus_return_statement() -> parse_result {
donsus_parser_next();
parse_result return_expression = donsus_expr(0);
return_statement->children.push_back(return_expression);
donsus_parser_except(DONSUS_SEMICOLON);
donsus_parser_except_current(DONSUS_SEMICOLON);
return return_statement;
}

Expand Down Expand Up @@ -1641,8 +1641,7 @@ auto DonsusParser::create_if_statement(donsus_ast::donsus_node_type type,
}

auto DonsusParser::create_else_statement(donsus_ast::donsus_node_type type,
uint64_t child_count)
-> parse_result {
uint64_t child_count) -> parse_result {
return donsus_tree->create_node<donsus_ast::else_statement>(type,
child_count);
}
Expand Down Expand Up @@ -1672,15 +1671,13 @@ auto DonsusParser::create_while_loop(donsus_ast::donsus_node_type type,
}

auto DonsusParser::create_range_for_loop(donsus_ast::donsus_node_type type,
uint64_t child_count)
-> parse_result {
uint64_t child_count) -> parse_result {
return donsus_tree->create_node<donsus_ast::range_for_loop>(type,
child_count);
}

auto DonsusParser::create_array_for_loop(donsus_ast::donsus_node_type type,
uint64_t child_count)
-> parse_result {
uint64_t child_count) -> parse_result {
return donsus_tree->create_node<donsus_ast::array_for_loop>(type,
child_count);
}
Expand Down
Loading