Changed topname to _main instead of main

This commit is contained in:
Egor Sheremetov 2024-05-28 15:22:49 +02:00 committed by Roman Venediktov
parent 87a489e2e3
commit f4b9aa1eb9
2 changed files with 5 additions and 3 deletions

View file

@ -143,7 +143,7 @@ class options args =
Filename.chop_suffix (Filename.basename self#get_infile) ".lama"
method topname =
match !mode with `Compile -> "init" ^ self#basename | _ -> "main"
match !mode with `Compile -> "init" ^ self#basename | _ -> "_main"
method dump_file ext contents =
let name = self#basename in

View file

@ -14,8 +14,10 @@ type scope = {
}
[@@deriving gt ~options:{ show }]
let label s = "_L" ^ s
let builtin_label s = "_B" ^ s
let normal_prefix = "_L"
let builtin_prefix = "_B"
let label s = normal_prefix ^ s
let builtin_label s = builtin_prefix ^ s
let scope_label i s = label s ^ "_" ^ string_of_int i
let show_scope = show scope