aboutsummaryrefslogtreecommitdiff
path: root/lux-python
diff options
context:
space:
mode:
authorEduardo Julian2022-03-15 07:24:35 -0400
committerEduardo Julian2022-03-15 07:24:35 -0400
commitbc36487224f670c23002cc4575c0dba3e5dc1be1 (patch)
tree01601f7e5d992ace77a16cfa90240ffc4511a7af /lux-python
parent4ef1ac1dfe0edd1a11bb7f1fd13c8b6cb8f1bab4 (diff)
De-sigil-ification: ^
Diffstat (limited to 'lux-python')
-rw-r--r--lux-python/source/program.lux25
1 files changed, 13 insertions, 12 deletions
diff --git a/lux-python/source/program.lux b/lux-python/source/program.lux
index 2d6c858aa..5404b13d4 100644
--- a/lux-python/source/program.lux
+++ b/lux-python/source/program.lux
@@ -25,6 +25,7 @@
["[0]" array {"+" Array}]
["[0]" list ("[1]#[0]" functor)]]]
["[0]" macro
+ ["^" pattern]
["[0]" template]
["[0]" code]]
[math
@@ -174,16 +175,16 @@
(case [(org/python/core/PyObject::__getitem__ (ffi.as_int +0) host_object)
(org/python/core/PyObject::__getitem__ (ffi.as_int +1) host_object)
(org/python/core/PyObject::__getitem__ (ffi.as_int +2) host_object)]
- (^or [{try.#Failure try} _ _]
- [_ {try.#Failure try} _]
- [_ _ {try.#Failure try}])
+ (^.or [{try.#Failure try} _ _]
+ [_ {try.#Failure try} _]
+ [_ _ {try.#Failure try}])
{try.#Failure try}
- (^multi [{try.#Success tag} {try.#Success flag} {try.#Success value}]
- [(read tag)
- {try.#Success tag}]
- [(read value)
- {try.#Success value}])
+ (^.multi [{try.#Success tag} {try.#Success flag} {try.#Success value}]
+ [(read tag)
+ {try.#Success tag}]
+ [(read value)
+ {try.#Success value}])
{try.#Success [tag
(: Any
(case (ffi.check org/python/core/PyNone
@@ -269,11 +270,11 @@
(in (loop [it it
inputs inputs]
(`` (`` (case inputs
- (^ (list))
+ (pattern (list))
(:as org/python/core/PyObject self)
(~~ (template [<arity>]
- [(^ (list (~~ (static.literals code.local_symbol (inputs/? <arity>)))))
+ [(pattern (list (~~ (static.literals code.local_symbol (inputs/? <arity>)))))
(to_host ((:as (~~ (static.literal function.identity (function/? <arity>))) it)
(~~ (static.literals code.local_symbol (inputs/? <arity>)))))]
@@ -286,8 +287,8 @@
[7]
[8]))
- (^ (list& (~~ (static.literals code.local_symbol (inputs/? 8)))
- input/+))
+ (pattern (list& (~~ (static.literals code.local_symbol (inputs/? 8)))
+ input/+))
(again ((:as (~~ (static.literal function.identity (function/? 8))) it)
(~~ (static.literals code.local_symbol (inputs/? 8))))
input/+))))))))))))