renamed function for parsing function literal
to avoid confusion with parsing function calls
This commit is contained in:
@@ -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)) {
|
||||
|
@@ -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();
|
||||
|
Reference in New Issue
Block a user