aboutsummaryrefslogtreecommitdiff
path: root/lux-php/source
diff options
context:
space:
mode:
authorEduardo Julian2021-09-10 01:21:23 -0400
committerEduardo Julian2021-09-10 01:21:23 -0400
commitcd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 (patch)
treeaf6366578f98f1a8e551f4da9f3ad230fd63a4dd /lux-php/source
parentef77466323f85a3d1b65b46a3deb93652ef22085 (diff)
Migrated variants to the new syntax.
Diffstat (limited to 'lux-php/source')
-rw-r--r--lux-php/source/program.lux42
1 files changed, 21 insertions, 21 deletions
diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux
index c2c61b1ef..9421b6f9c 100644
--- a/lux-php/source/program.lux
+++ b/lux-php/source/program.lux
@@ -185,34 +185,34 @@
(<| (if (ffi.null? value)
(php/runtime/memory/NullMemory::INSTANCE))
(case (ffi.check java/lang/Boolean value)
- (#.Some value)
+ {#.Some value}
(if (:as Bit value)
(php/runtime/memory/TrueMemory::INSTANCE)
(php/runtime/memory/FalseMemory::INSTANCE))
#.None)
(case (ffi.check java/lang/Long value)
- (#.Some value)
+ {#.Some value}
(php/runtime/memory/LongMemory::new value)
#.None)
(case (ffi.check java/lang/Double value)
- (#.Some value)
+ {#.Some value}
(php/runtime/memory/DoubleMemory::new value)
#.None)
(case (ffi.check java/lang/String value)
- (#.Some value)
+ {#.Some value}
(php/runtime/memory/StringMemory::new value)
#.None)
(case (ffi.check [java/lang/Object] value)
- (#.Some value)
+ {#.Some value}
(lux_structure (:as (Array java/lang/Object) value))
#.None)
(case (ffi.check php/runtime/memory/ObjectMemory value)
- (#.Some value)
+ {#.Some value}
value
#.None)
@@ -243,7 +243,7 @@
php/runtime/Memory
(`` (<| (~~ (template [<class> <method> <extractor>]
[(case (ffi.check <class> index)
- (#.Some index)
+ {#.Some index}
(<method> trace (<extractor> index) self)
#.None)]
@@ -286,7 +286,7 @@
#.None
(php/runtime/memory/NullMemory::INSTANCE)
- (#.Some value)
+ {#.Some value}
..unit)
(^ (static runtime.variant_value_field))
@@ -317,17 +317,17 @@
(:as php/runtime/memory/ReferenceMemory)
php/runtime/memory/ReferenceMemory::getValue)]
(case (ffi.check php/runtime/memory/NullMemory value)
- (#.Some _)
+ {#.Some _}
(recur (++ idx) output)
#.None
(case (read value)
- (#try.Success lux_value)
+ {#try.Success lux_value}
(recur (++ idx) (array.write! idx lux_value output))
error
error)))
- (#try.Success output)))))
+ {#try.Success output}))))
(def: variant_tag_field
(php/runtime/memory/StringMemory::new runtime.variant_tag_field))
@@ -348,8 +348,8 @@
(php/runtime/memory/ArrayMemory::get ..variant_value_field)
maybe.trusted
read)]
- [(#try.Success tag) (#try.Success value)]
- (#try.Success [(java/lang/Long::intValue (:as java/lang/Long tag))
+ [{#try.Success tag} {#try.Success value}]
+ {#try.Success [(java/lang/Long::intValue (:as java/lang/Long tag))
(: Any
(case (|> host_object
(php/runtime/memory/ArrayMemory::get ..variant_flag_field)
@@ -357,12 +357,12 @@
(:as php/runtime/memory/ReferenceMemory)
php/runtime/memory/ReferenceMemory::getValue
(ffi.check php/runtime/memory/NullMemory))
- (#.Some _)
+ {#.Some _}
(ffi.null)
#.None
synthesis.unit))
- value])
+ value]}
_
(exception.throw ..unknown_kind_of_object host_object)))
@@ -376,8 +376,8 @@
Reader
(`` (<| (~~ (template [<class> <constant>]
[(case (ffi.check <class> host_object)
- (#.Some _)
- (#try.Success <constant>)
+ {#.Some _}
+ {#try.Success <constant>}
#.None)]
@@ -386,7 +386,7 @@
))
(~~ (template [<class> <post>]
[(case (ffi.check <class> host_object)
- (#.Some value)
+ {#.Some value}
(`` (|> value (~~ (template.splice <post>))))
#.None)]
@@ -399,10 +399,10 @@
[php/runtime/memory/ObjectMemory [#try.Success]]
))
(case (ffi.check php/runtime/memory/ArrayMemory host_object)
- (#.Some value)
+ {#.Some value}
(if (|> value
(php/runtime/memory/ArrayMemory::get ..tuple_size_field)
- (case> (#.Some _) false #.None true))
+ (case> {#.Some _} false #.None true))
(read_variant read value)
(read_tuple read value))
@@ -457,7 +457,7 @@
(def: (expander macro inputs lux)
Expander
(case (ensure_macro macro)
- (#.Some macro)
+ {#.Some macro}
(call_macro inputs lux macro)
#.None