add export keyword

This commit is contained in:
2025-12-18 16:15:56 +01:00
parent daf9079ca4
commit fbf28748c7
5 changed files with 20 additions and 3 deletions

View File

@@ -232,8 +232,9 @@ _builtin_environ:
params,
return_type: _,
body,
exported,
} => {
if name.lexeme == "main" {
if exported || name.lexeme == "main" {
emit!(&mut self.output, "global {}", name.lexeme);
}
emit!(&mut self.output, "section .text.{}", name.lexeme);