diff options
Diffstat (limited to 'stdlib/source/test/lux/data/text/regex.lux')
-rw-r--r-- | stdlib/source/test/lux/data/text/regex.lux | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux index c16388e4e..43a34d694 100644 --- a/stdlib/source/test/lux/data/text/regex.lux +++ b/stdlib/source/test/lux/data/text/regex.lux @@ -14,7 +14,7 @@ ["[0]" text (.open: "[1]#[0]" equivalence) ["%" format (.only format)]]] ["[0]" macro (.only) - [syntax (.only syntax:)] + [syntax (.only syntax)] ["[0]" code]] [math [number (.only hex)] @@ -55,18 +55,19 @@ _ false))) -(syntax: (should_check [pattern <code>.any - regex <code>.any - input <code>.any]) - (macro.with_symbols [g!message g!_] - (in (list (` (|> (~ input) - (<text>.result (~ regex)) - (pipe.case - (pattern {try.#Success (~ pattern)}) - true +(def: should_check + (syntax (_ [pattern <code>.any + regex <code>.any + input <code>.any]) + (macro.with_symbols [g!message g!_] + (in (list (` (|> (~ input) + (<text>.result (~ regex)) + (pipe.case + (pattern {try.#Success (~ pattern)}) + true - (~ g!_) - false))))))) + (~ g!_) + false)))))))) (def: basics Test @@ -276,14 +277,15 @@ "123-456-7890"))) )) -(syntax: (expands? [form <code>.any]) - (function (_ lux) - {try.#Success [lux (list (code.bit (case (macro.single_expansion form lux) - {try.#Success _} - true +(def: expands? + (syntax (_ [form <code>.any]) + (function (_ lux) + {try.#Success [lux (list (code.bit (case (macro.single_expansion form lux) + {try.#Success _} + true - {try.#Failure error} - false)))]})) + {try.#Failure error} + false)))]}))) (def: .public test Test |