diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/macro/syntax/common/check.lux | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/stdlib/source/lux/macro/syntax/common/check.lux b/stdlib/source/lux/macro/syntax/common/check.lux new file mode 100644 index 000000000..dcb8f6c26 --- /dev/null +++ b/stdlib/source/lux/macro/syntax/common/check.lux @@ -0,0 +1,31 @@ +(.module: + [lux #* + ["." meta] + [abstract + [monad (#+ do)]] + [control + ["." exception (#+ exception:)] + ["<>" parser + ["<.>" code (#+ Parser)]]] + [macro + ["." code]]]) + +(def: extension + "lux check") + +(type: #export Check + {#type Code + #value Code}) + +(def: #export (write (^slots [#type #value])) + (-> Check Code) + (` ((~ (code.text ..extension)) + (~ type) + (~ value)))) + +(def: #export parser + (Parser Check) + (<| <code>.form + (<>.after (<code>.text! ..extension)) + (<>.and <code>.any + <code>.any))) |