Pass 'basic_macro'

This commit is contained in:
David Gonzalez Martin 2025-06-17 05:44:10 -06:00
parent 156fed3166
commit 51cad46ad6
3 changed files with 791 additions and 82 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1029,7 +1029,6 @@ struct MacroDeclaration
{ {
Slice<Argument> arguments; Slice<Argument> arguments;
Slice<ConstantArgument> constant_arguments; Slice<ConstantArgument> constant_arguments;
TypeList types;
Type* return_type; Type* return_type;
Block* block; Block* block;
String name; String name;

View File

@ -2693,7 +2693,11 @@ fn Statement* parse_statement(Module* module, Scope* scope)
} break; } break;
case StatementStartKeyword::return_st: case StatementStartKeyword::return_st:
{ {
auto return_value = parse_value(module, scope, {}); Value* return_value = 0;
if (module->content[module->offset] != ';')
{
return_value = parse_value(module, scope, {});
}
statement->return_st = return_value; statement->return_st = return_value;
statement->id = StatementId::return_st; statement->id = StatementId::return_st;
} break; } break;