diff options
Diffstat (limited to 'stdlib/source/library/lux/control/parser/synthesis.lux')
-rw-r--r-- | stdlib/source/library/lux/control/parser/synthesis.lux | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/stdlib/source/library/lux/control/parser/synthesis.lux b/stdlib/source/library/lux/control/parser/synthesis.lux index 0bc446089..1578f9115 100644 --- a/stdlib/source/library/lux/control/parser/synthesis.lux +++ b/stdlib/source/library/lux/control/parser/synthesis.lux @@ -53,13 +53,13 @@ (def: .public (result parser input) (All (_ a) (-> (Parser a) (List Synthesis) (Try a))) (case (parser input) - (#try.Failure error) - (#try.Failure error) + {#try.Failure error} + {#try.Failure error} - (#try.Success [#.End value]) - (#try.Success value) + {#try.Success [#.End value]} + {#try.Success value} - (#try.Success [unconsumed _]) + {#try.Success [unconsumed _]} (exception.except ..unconsumed_input unconsumed))) (def: .public any @@ -69,22 +69,22 @@ #.End (exception.except ..empty_input []) - (#.Item [head tail]) - (#try.Success [tail head])))) + {#.Item [head tail]} + {#try.Success [tail head]}))) (def: .public end! (Parser Any) (.function (_ tokens) (case tokens - #.End (#try.Success [tokens []]) + #.End {#try.Success [tokens []]} _ (exception.except ..expected_empty_input [tokens])))) (def: .public end? (Parser Bit) (.function (_ tokens) - (#try.Success [tokens (case tokens + {#try.Success [tokens (case tokens #.End true - _ false)]))) + _ false)]})) (template [<query> <assertion> <tag> <type> <eq>] [(`` (def: .public <query> @@ -92,7 +92,7 @@ (.function (_ input) (case input (^ (list& (<tag> x) input')) - (#try.Success [input' x]) + {#try.Success [input' x]} _ (exception.except ..cannot_parse input))))) @@ -103,7 +103,7 @@ (case input (^ (list& (<tag> actual) input')) (if (\ <eq> = expected actual) - (#try.Success [input' []]) + {#try.Success [input' []]} (exception.except ..cannot_parse input)) _ @@ -125,7 +125,7 @@ (^ (list& (/.tuple head) tail)) (do try.monad [output (..result parser head)] - (#try.Success [tail output])) + {#try.Success [tail output]}) _ (exception.except ..cannot_parse input)))) @@ -138,7 +138,7 @@ (if (n.= expected actual) (do try.monad [output (..result parser (list body))] - (#try.Success [tail [environment output]])) + {#try.Success [tail [environment output]]}) (exception.except ..wrong_arity [expected actual])) _ @@ -152,7 +152,7 @@ (do try.monad [inits (..result init_parsers inits) iteration (..result iteration_parser (list iteration))] - (#try.Success [tail [start inits iteration]])) + {#try.Success [tail [start inits iteration]]}) _ (exception.except ..cannot_parse input)))) |