diff options
Diffstat (limited to 'stdlib/source/parser/lux/tool')
-rw-r--r-- | stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux | 16 | ||||
-rw-r--r-- | stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux | 18 |
2 files changed, 17 insertions, 17 deletions
diff --git a/stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux b/stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux index 3a298ba27..eb2695e96 100644 --- a/stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux +++ b/stdlib/source/parser/lux/tool/compiler/language/lux/analysis.lux @@ -31,7 +31,7 @@ [variable (.only)]]]]]] ["/" \\library (.only Environment Analysis)]) -(def: (remaining_inputs asts) +(def (remaining_inputs asts) (-> (List Analysis) Text) (format text.new_line "Remaining input: " (|> asts @@ -49,7 +49,7 @@ (type: .public Parser (//.Parser (List Analysis))) -(def: .public (result parser input) +(def .public (result parser input) (All (_ a) (-> (Parser a) (List Analysis) (Try a))) (case (parser input) {try.#Failure error} @@ -61,7 +61,7 @@ {try.#Success [unconsumed _]} (exception.except ..unconsumed_input unconsumed))) -(def: .public any +(def .public any (Parser Analysis) (function (_ input) (case input @@ -71,7 +71,7 @@ {.#Item [head tail]} {try.#Success [tail head]}))) -(def: .public end +(def .public end (Parser Any) (function (_ tokens) (case tokens @@ -79,7 +79,7 @@ _ {try.#Failure (format "Expected list of tokens to be empty!" (remaining_inputs tokens))}))) -(def: .public end? +(def .public end? (Parser Bit) (function (_ tokens) {try.#Success [tokens (case tokens @@ -87,7 +87,7 @@ _ false)]})) (with_template [<query> <assertion> <tag> <type> <eq>] - [(`` (these (def: .public <query> + [(`` (these (def .public <query> (Parser <type>) (function (_ input) (case input @@ -97,7 +97,7 @@ _ (exception.except ..cannot_parse input)))) - (def: .public (<assertion> expected) + (def .public (<assertion> expected) (-> <type> (Parser Any)) (function (_ input) (case input @@ -120,7 +120,7 @@ [constant this_constant /.constant Symbol symbol.equivalence] ) -(def: .public (tuple parser) +(def .public (tuple parser) (All (_ a) (-> (Parser a) (Parser a))) (function (_ input) (case input diff --git a/stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux b/stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux index c6537531f..535e03cc0 100644 --- a/stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux +++ b/stdlib/source/parser/lux/tool/compiler/language/lux/synthesis.lux @@ -54,7 +54,7 @@ (type: .public Parser (//.Parser (List Synthesis))) -(def: .public (result parser input) +(def .public (result parser input) (All (_ a) (-> (Parser a) (List Synthesis) (Try a))) (case (parser input) {try.#Failure error} @@ -66,7 +66,7 @@ {try.#Success [unconsumed _]} (exception.except ..unconsumed_input unconsumed))) -(def: .public any +(def .public any (Parser Synthesis) (.function (_ input) (case input @@ -76,14 +76,14 @@ {.#Item [head tail]} {try.#Success [tail head]}))) -(def: .public end +(def .public end (Parser Any) (.function (_ tokens) (case tokens {.#End} {try.#Success [tokens []]} _ (exception.except ..expected_empty_input [tokens])))) -(def: .public end? +(def .public end? (Parser Bit) (.function (_ tokens) {try.#Success [tokens (case tokens @@ -91,7 +91,7 @@ _ false)]})) (with_template [<query> <assertion> <tag> <type> <eq>] - [(`` (def: .public <query> + [(`` (def .public <query> (Parser <type>) (.function (_ input) (case input @@ -101,7 +101,7 @@ _ (exception.except ..cannot_parse input))))) - (`` (def: .public (<assertion> expected) + (`` (def .public (<assertion> expected) (-> <type> (Parser Any)) (.function (_ input) (case input @@ -122,7 +122,7 @@ [constant this_constant /.constant Symbol symbol.equivalence] ) -(def: .public (tuple parser) +(def .public (tuple parser) (All (_ a) (-> (Parser a) (Parser a))) (.function (_ input) (case input @@ -134,7 +134,7 @@ _ (exception.except ..cannot_parse input)))) -(def: .public (function expected parser) +(def .public (function expected parser) (All (_ a) (-> Arity (Parser a) (Parser [(Environment Synthesis) a]))) (.function (_ input) (case input @@ -148,7 +148,7 @@ _ (exception.except ..cannot_parse input)))) -(def: .public (loop init_parsers iteration_parser) +(def .public (loop init_parsers iteration_parser) (All (_ a b) (-> (Parser a) (Parser b) (Parser [Register a b]))) (.function (_ input) (case input |