Main function

This commit is contained in:
2026-04-21 12:29:06 +02:00
parent 18fedba119
commit e45546ad2e
2 changed files with 6 additions and 5 deletions
+4 -1
View File
@@ -21,7 +21,10 @@ pub fn walk_ast(top_scope: Arc<Scope>, tl: &mut Vec<parser::ast::TopLevel>) {
params, body, name, ..
} => {
let rf = top_scope.get_reference(name).unwrap();
*name = rf.name.clone();
if name != "main" {
*name = rf.name.clone();
}
match &*rf.var_type {
hir::TypeRef::Function(f) => walk_param_list(&f.params, params),
+2 -4
View File
@@ -1,7 +1,5 @@
package main;
export struct MyType {
export x: int,
function main() {
let a = 10;
}
export function test(a: MyType) { }