diff options
author | Eduardo Julian | 2018-01-08 22:09:12 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-01-08 22:09:12 -0400 |
commit | d48da794a693c00990c411b669d6412b8bf4d904 (patch) | |
tree | a1442427fdd9852ec0199a65b4b9999b35261137 /new-luxc/source/luxc/lang/init.lux | |
parent | 9eaaaf953ba7ce1eeb805603f4e113aa15f5178f (diff) |
- Re-factored initialization functions to their own module.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/init.lux | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/new-luxc/source/luxc/lang/init.lux b/new-luxc/source/luxc/lang/init.lux new file mode 100644 index 000000000..80968d7cd --- /dev/null +++ b/new-luxc/source/luxc/lang/init.lux @@ -0,0 +1,45 @@ +(.module: + lux + [//] + (// [".L" extension] + (translation (jvm [".T" common])))) + +(def: #export (cursor file) + (-> Text Cursor) + [file +1 +0]) + +(def: #export (source file code) + (-> Text Text Source) + [(cursor file) +0 code]) + +(def: dummy-source + Source + [.dummy-cursor +0 ""]) + +(def: #export type-context + Type-Context + {#.ex-counter +0 + #.var-counter +0 + #.var-bindings (list)}) + +(def: #export info + Info + {#.target (for {"JVM" "JVM" + "JS" "JS"}) + #.version //.version + #.mode #.Build}) + +(def: #export (compiler host) + (-> commonT.Host Compiler) + {#.info ..info + #.source dummy-source + #.cursor .dummy-cursor + #.current-module #.None + #.modules (list) + #.scopes (list) + #.type-context ..type-context + #.expected #.None + #.seed +0 + #.scope-type-vars (list) + #.extensions (:! Void extensionL.fresh) + #.host (:! Void host)}) |