diff options
Diffstat (limited to 'stdlib/source/lux/tool/compiler/language/lux.lux')
-rw-r--r-- | stdlib/source/lux/tool/compiler/language/lux.lux | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/stdlib/source/lux/tool/compiler/language/lux.lux b/stdlib/source/lux/tool/compiler/language/lux.lux deleted file mode 100644 index 1d507b52f..000000000 --- a/stdlib/source/lux/tool/compiler/language/lux.lux +++ /dev/null @@ -1,106 +0,0 @@ -(.module: - [lux #* - [control - ["<>" parser - ["<b>" binary (#+ Parser)]]] - [data - [format - ["_" binary (#+ Writer)]]]] - ["." / #_ - ["#." version] - [phase - [analysis - ["." module]]] - [/// - [meta - [archive - ["." signature] - ["." key (#+ Key)]]]]]) - -## TODO: Remove #module_hash, #imports & #module_state ASAP. -## TODO: Not just from this parser, but from the lux.Module type. -(def: #export writer - (Writer .Module) - (let [definition (: (Writer Definition) - ($_ _.and _.bit _.type _.code _.any)) - name (: (Writer Name) - (_.and _.text _.text)) - alias (: (Writer Alias) - (_.and _.text _.text)) - global (: (Writer Global) - (_.or alias - definition)) - tag (: (Writer [Nat (List Name) Bit Type]) - ($_ _.and - _.nat - (_.list name) - _.bit - _.type)) - type (: (Writer [(List Name) Bit Type]) - ($_ _.and - (_.list name) - _.bit - _.type))] - ($_ _.and - ## #module_hash - _.nat - ## #module_aliases - (_.list alias) - ## #definitions - (_.list (_.and _.text global)) - ## #imports - (_.list _.text) - ## #tags - (_.list (_.and _.text tag)) - ## #types - (_.list (_.and _.text type)) - ## #module_annotations - (_.maybe _.code) - ## #module_state - _.any))) - -(def: #export parser - (Parser .Module) - (let [definition (: (Parser Definition) - ($_ <>.and <b>.bit <b>.type <b>.code <b>.any)) - name (: (Parser Name) - (<>.and <b>.text <b>.text)) - alias (: (Parser Alias) - (<>.and <b>.text <b>.text)) - global (: (Parser Global) - (<b>.or alias - definition)) - tag (: (Parser [Nat (List Name) Bit Type]) - ($_ <>.and - <b>.nat - (<b>.list name) - <b>.bit - <b>.type)) - type (: (Parser [(List Name) Bit Type]) - ($_ <>.and - (<b>.list name) - <b>.bit - <b>.type))] - ($_ <>.and - ## #module_hash - <b>.nat - ## #module_aliases - (<b>.list alias) - ## #definitions - (<b>.list (<>.and <b>.text global)) - ## #imports - (<b>.list <b>.text) - ## #tags - (<b>.list (<>.and <b>.text tag)) - ## #types - (<b>.list (<>.and <b>.text type)) - ## #module_annotations - (<b>.maybe <b>.code) - ## #module_state - (\ <>.monad wrap #.Cached)))) - -(def: #export key - (Key .Module) - (key.key {#signature.name (name_of ..compiler) - #signature.version /version.version} - (module.new 0))) |