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(
|
register_prefix(
|
||||||
token::type::FUNCTION,
|
token::type::FUNCTION,
|
||||||
std::bind(&parser::parse_function, this)
|
std::bind(&parser::parse_function_lit, this)
|
||||||
);
|
);
|
||||||
|
|
||||||
using namespace std::placeholders;
|
using namespace std::placeholders;
|
||||||
@@ -292,7 +292,7 @@ namespace parser {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ast::function_literal* parser::parse_function() {
|
ast::function_literal* parser::parse_function_lit() {
|
||||||
TRACE_FUNCTION;
|
TRACE_FUNCTION;
|
||||||
ast::function_literal* ret = new ast::function_literal(current);
|
ast::function_literal* ret = new ast::function_literal(current);
|
||||||
if (!expect_next(token::type::LPAREN)) {
|
if (!expect_next(token::type::LPAREN)) {
|
||||||
|
@@ -61,7 +61,7 @@ namespace parser {
|
|||||||
ast::integer_literal* parse_integer();
|
ast::integer_literal* parse_integer();
|
||||||
ast::boolean_literal* parse_boolean();
|
ast::boolean_literal* parse_boolean();
|
||||||
std::vector<ast::identifier*> parse_function_parameters();
|
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::prefix_expr* parse_prefix_expr();
|
||||||
ast::expression* parse_grouped_expr();
|
ast::expression* parse_grouped_expr();
|
||||||
ast::if_then_else* parse_if_then_else();
|
ast::if_then_else* parse_if_then_else();
|
||||||
|
Reference in New Issue
Block a user