diff options
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase')
9 files changed, 34 insertions, 24 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux index 998590d1c..14a77c65c 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/analysis/jvm.lux @@ -3,7 +3,8 @@ [abstract ["." monad (#+ do)]] [control - ["p" parser] + ["p" parser + ["s" code (#+ Parser)]] ["." exception (#+ exception:)] pipe] [data @@ -18,8 +19,7 @@ ["." dictionary (#+ Dictionary)]]] ["." type ["." check]] - ["." macro - ["s" syntax (#+ Syntax)]] + ["." macro] ["." host (#+ import:)]] ["." // #_ ["#." common] @@ -35,7 +35,7 @@ (def: (custom [syntax handler]) (All [s] - (-> [(Syntax s) + (-> [(Parser s) (-> Text Phase s (Operation Analysis))] Handler)) (function (_ extension-name analyse args) @@ -51,7 +51,7 @@ #member Text}) (def: member - (Syntax Member) + (Parser Member) ($_ p.and s.text s.text)) (type: Method-Signature @@ -1180,7 +1180,7 @@ (/////analysis.throw too-many-candidates [class-name ..constructor-method candidates])))) (def: typed-input - (Syntax [Text Code]) + (Parser [Text Code]) (s.tuple (p.and s.text s.any))) (def: (decorate-inputs typesT inputsA) diff --git a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux index 629e5af59..61243a9bc 100644 --- a/stdlib/source/lux/tool/compiler/phase/extension/statement.lux +++ b/stdlib/source/lux/tool/compiler/phase/extension/statement.lux @@ -4,7 +4,8 @@ ["." monad (#+ do)]] [control [io (#+ IO)] - ["p" parser]] + ["p" parser + ["s" code (#+ Parser)]]] [data ["." product] ["." maybe] @@ -15,8 +16,7 @@ ["." list ("#;." functor)] ["." dictionary]]] ["." macro - ["." code] - ["s" syntax (#+ Syntax)]] + ["." code]] [type (#+ :share :by-example) ["." check]]] ["." // @@ -171,7 +171,7 @@ (///.throw //.invalid-syntax [extension-name %code inputsC+])))) (def: imports - (Syntax (List Import)) + (Parser (List Import)) (|> (s.tuple (p.and s.text s.text)) p.some s.tuple)) diff --git a/stdlib/source/lux/tool/compiler/phase/generation/extension.lux b/stdlib/source/lux/tool/compiler/phase/generation/extension.lux index 7c08e94cc..2dddb89f6 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/extension.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/extension.lux @@ -2,12 +2,15 @@ [lux #* [abstract ["." monad (#+ do)]] + [control + [parser + ["s" code]]] [data [collection ["." list ("#@." functor)]]] ["." macro (#+ with-gensyms) ["." code] - ["s" syntax (#+ syntax:)]]] + [syntax (#+ syntax:)]]] ["." // ["#/" // ["#." extension] diff --git a/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux index 8908c3335..c94b68337 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/js/runtime.lux @@ -4,7 +4,8 @@ [monad (#+ do)]] [control ["." function] - ["p" parser]] + ["p" parser + ["s" code]]] [data [number (#+ hex) ["." i64]] @@ -14,7 +15,7 @@ ["." list ("#;." functor)]]] ["." macro ["." code] - ["s" syntax (#+ syntax:)]] + [syntax (#+ syntax:)]] [host ["_" js (#+ Expression Var Computation Statement)]]] ["." /// diff --git a/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux index 648d35d32..6eeddc5ff 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/lua/runtime.lux @@ -4,7 +4,8 @@ [monad (#+ do)]] [control ["." function] - ["p" parser]] + ["p" parser + ["s" code]]] [data [number (#+ hex) ["." i64]] @@ -14,7 +15,7 @@ ["." list ("#@." functor)]]] ["." macro ["." code] - ["s" syntax (#+ syntax:)]] + [syntax (#+ syntax:)]] [host ["_" lua (#+ Expression Location Var Computation Literal Statement)]]] ["." /// diff --git a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux index 896b9e18a..44b9d290f 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/python/runtime.lux @@ -4,7 +4,8 @@ [monad (#+ do)]] [control ["." function] - ["p" parser]] + ["p" parser + ["s" code]]] [data [number (#+ hex) ["." i64]] @@ -14,7 +15,7 @@ ["." list ("#@." functor)]]] ["." macro ["." code] - ["s" syntax (#+ syntax:)]] + [syntax (#+ syntax:)]] [host ["_" python (#+ Expression SVar Computation Literal Statement)]]] ["." /// diff --git a/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux index 71edc3e07..81bdc8702 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/ruby/runtime.lux @@ -4,7 +4,8 @@ [monad (#+ do)]] [control ["." function] - ["p" parser]] + ["p" parser + ["s" code]]] [data [number (#+ hex) ["." i64]] @@ -14,7 +15,7 @@ ["." list ("#@." functor)]]] ["." macro ["." code] - ["s" syntax (#+ syntax:)]] + [syntax (#+ syntax:)]] [host ["_" ruby (#+ Expression LVar Computation Literal Statement)]]] ["." /// diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux index cb96a5718..31c101fdf 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/extension/common.lux @@ -3,7 +3,9 @@ [abstract ["." monad (#+ do)]] [control - ["ex" exception (#+ exception:)]] + ["ex" exception (#+ exception:)] + [parser + ["s" code]]] [data ["e" error] ["." product] @@ -15,7 +17,7 @@ ["dict" dictionary (#+ Dictionary)]]] ["." macro (#+ with-gensyms) ["." code] - ["s" syntax (#+ syntax:)]] + [syntax (#+ syntax:)]] [host (#+ import:) ["_" scheme (#+ Expression Computation)]]] ["." /// #_ diff --git a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux index b66b7abaf..bda2f7783 100644 --- a/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux +++ b/stdlib/source/lux/tool/compiler/phase/generation/scheme/runtime.lux @@ -4,7 +4,8 @@ [monad (#+ do)]] [control ["." function] - ["p" parser ("#;." monad)]] + ["p" parser ("#;." monad) + ["s" code (#+ Parser)]]] [data [number (#+ hex)] [text @@ -13,7 +14,7 @@ ["." list ("#;." monad)]]] [macro ["." code] - ["s" syntax (#+ syntax:)]] + [syntax (#+ syntax:)]] [host ["_" scheme (#+ Expression Computation Var)]]] ["." /// @@ -73,7 +74,7 @@ (|>> [0 #1] ..variant)) (def: declaration - (s.Syntax [Text (List Text)]) + (Parser [Text (List Text)]) (p.either (p.and s.local-identifier (p;wrap (list))) (s.form (p.and s.local-identifier (p.some s.local-identifier))))) |