renamed function for parsing function literal

to avoid confusion with parsing function calls
This commit is contained in:
Karma Riuk
2025-07-15 09:25:00 +02:00
parent 98fb161bba
commit 59bff59cf7
2 changed files with 3 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ namespace parser {
register_prefix(
token::type::FUNCTION,
std::bind(&parser::parse_function, this)
std::bind(&parser::parse_function_lit, this)
);
using namespace std::placeholders;
@@ -292,7 +292,7 @@ namespace parser {
return ret;
}
ast::function_literal* parser::parse_function() {
ast::function_literal* parser::parse_function_lit() {
TRACE_FUNCTION;
ast::function_literal* ret = new ast::function_literal(current);
if (!expect_next(token::type::LPAREN)) {

View File

@@ -61,7 +61,7 @@ namespace parser {
ast::integer_literal* parse_integer();
ast::boolean_literal* parse_boolean();
std::vector<ast::identifier*> parse_function_parameters();
ast::function_literal* parse_function();
ast::function_literal* parse_function_lit();
ast::prefix_expr* parse_prefix_expr();
ast::expression* parse_grouped_expr();
ast::if_then_else* parse_if_then_else();