diff options
author | Eduardo Julian | 2022-09-03 14:31:47 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-09-03 14:31:47 -0400 |
commit | 1f4557bf0d904231b3b8d2b2bf73c35e9caead48 (patch) | |
tree | 30e49d4ed6cc75b3185ed9a771d2dbb004fca00f /stdlib/source/library/lux.lux | |
parent | 950836e72a1b775ccab19a722566c431f56208f6 (diff) |
Added support for context-oriented programming.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/library/lux.lux | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index d5c43cc7f..8a829ae10 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -3769,7 +3769,7 @@ {#None} (failure (..wrong_syntax_error (symbol ..def)))))) -(with_template [<name> <form> <message>] +(with_template [<name> <nullary> <form>] [(def .public <name> (macro (_ tokens) (when (list#reversed tokens) @@ -3780,10 +3780,11 @@ init))) _ - (failure <message>))))] + (meta#in (list (` <nullary>))))))] - [and (if (, pre) (, post) #0) "'and' requires >=1 clauses."] - [or (if (, pre) #1 (, post)) "'or' requires >=1 clauses."]) + [and #1 (if (, pre) (, post) #0)] + [or #0 (if (, pre) #1 (, post))] + ) (def (index part text) (-> Text Text (Maybe Nat)) |