Commit cae11eff authored by Guillaume Charifi's avatar Guillaume Charifi

compiler/parser: Parse method.

parent c30d4d93
......@@ -1426,6 +1426,22 @@ static int parse_function(struct parser_ctx *ctx, unsigned long *cur_tok_id)
return 0;
static int parse_method(struct parser_ctx *ctx, unsigned long *cur_tok_id, struct bm_ast_node *out, struct bm_ast_type *class_type)
int result;
unsigned long i = *cur_tok_id;
struct bm_ast_node method;
result = parse_function_common(ctx, &i, &method, class_type);
if (result < 0)
return -1;
*out = method;
*cur_tok_id = i;
return 0;
static int prop_dtor(struct bm_ast_node *node)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment