From 1f4557bf0d904231b3b8d2b2bf73c35e9caead48 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 3 Sep 2022 14:31:47 -0400 Subject: Added support for context-oriented programming. --- stdlib/source/library/lux.lux | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'stdlib/source/library/lux.lux') 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 [
] +(with_template [ ] [(def .public (macro (_ tokens) (when (list#reversed tokens) @@ -3780,10 +3780,11 @@ init))) _ - (failure ))))] + (meta#in (list (` ))))))] - [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)) -- cgit v1.2.3