mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-24 15:48:47 +00:00
Initialization of separate units; fixed runtime
This commit is contained in:
parent
811c24d5a6
commit
c09a3b36b6
13 changed files with 116 additions and 46 deletions
|
|
@ -104,7 +104,11 @@ class options args =
|
|||
| Some name -> name
|
||||
method get_help = !help
|
||||
method get_include_paths = !paths
|
||||
method basename = Filename.chop_suffix self#get_infile ".expr"
|
||||
method basename = Filename.chop_suffix (Filename.basename self#get_infile) ".expr"
|
||||
method topname =
|
||||
match !mode with
|
||||
| `Compile -> "init" ^ self#basename
|
||||
| _ -> "main"
|
||||
method dump_file ext contents =
|
||||
let name = self#basename in
|
||||
let outf = open_out (Printf.sprintf "%s.%s" name ext) in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue