From 59bff59cf7f539c818b55796e96b7f64f250e6a3 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Tue, 15 Jul 2025 09:25:00 +0200 Subject: [PATCH] renamed function for parsing function literal to avoid confusion with parsing function calls --- src/parser/parser.cpp | 4 ++-- src/parser/parser.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/parser/parser.cpp b/src/parser/parser.cpp index eb0b726..db3ae6b 100644 --- a/src/parser/parser.cpp +++ b/src/parser/parser.cpp @@ -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)) { diff --git a/src/parser/parser.hpp b/src/parser/parser.hpp index fb520e1..0269884 100644 --- a/src/parser/parser.hpp +++ b/src/parser/parser.hpp @@ -61,7 +61,7 @@ namespace parser { ast::integer_literal* parse_integer(); ast::boolean_literal* parse_boolean(); std::vector 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();