The unified diff between revisions [9a6e8df1..] and [adff2b70..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'src/lsc/ast.c'
# # old_revision [9a6e8df1d6b102f467702e274d53d90f9151e2c8] # new_revision [adff2b70cc1870df9f9b4d736b855dffae74eca2] # # patch "src/lsc/ast.c" # from [38d7a1613ebd1088ccb91c4fc2c7c711467cdd57] # to [d0c7066749da60adc317b58c4630de00a072a23f] # ============================================================ --- src/lsc/ast.c 38d7a1613ebd1088ccb91c4fc2c7c711467cdd57 +++ src/lsc/ast.c d0c7066749da60adc317b58c4630de00a072a23f @@ -110,6 +110,21 @@ ast *make_fndefint(char *identifier, lon return elem; } +ast *make_fndefint_v(char *identifier, long num) +{ + ast *elem = safe_malloc(sizeof(ast)); + ast_list *list = NULL; + + elem->tag = node_ast; + elem->info.node.tag = kind_fndefint_v; + list = make_list(make_integer(num), list); + list = make_list(make_string(identifier), list); + elem->info.node.head = list; + elem->lineno = yylineno; + + return elem; +} + ast *make_constant(char *identifier, long num) { ast *elem = safe_malloc(sizeof(ast)); @@ -297,13 +312,13 @@ ast *make_case_statement_number(long num return elem; } -ast *make_return_statement(void) +ast *make_return_statement(ast *expression) { ast *elem = safe_malloc(sizeof(ast)); elem->tag = node_ast; elem->info.node.tag = stmt_return; - elem->info.node.head = NULL; + elem->info.node.head = make_list(expression, NULL); elem->lineno = yylineno; return elem;