diff options
author | Eduardo Julian | 2021-09-12 00:07:08 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-09-12 00:07:08 -0400 |
commit | dda05bca0956af5e5b3875c4cc36e61aa04772e4 (patch) | |
tree | 0f8b27697d58ab5c8e41aba7c7c9f769d3800767 /lux-php/source | |
parent | d48270f43c404ba19ca04da2553455ecaaf2caba (diff) |
Made the "#" character great again!
Diffstat (limited to 'lux-php/source')
-rw-r--r-- | lux-php/source/program.lux | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/lux-php/source/program.lux b/lux-php/source/program.lux index 9421b6f9c..5fdcc3600 100644 --- a/lux-php/source/program.lux +++ b/lux-php/source/program.lux @@ -185,37 +185,37 @@ (<| (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) + {.#None}) (case (ffi.check java/lang/Long value) - {#.Some value} + {.#Some value} (php/runtime/memory/LongMemory::new value) - #.None) + {.#None}) (case (ffi.check java/lang/Double value) - {#.Some value} + {.#Some value} (php/runtime/memory/DoubleMemory::new value) - #.None) + {.#None}) (case (ffi.check java/lang/String value) - {#.Some value} + {.#Some value} (php/runtime/memory/StringMemory::new value) - #.None) + {.#None}) (case (ffi.check [java/lang/Object] value) - {#.Some value} + {.#Some value} (lux_structure (:as (Array java/lang/Object) value)) - #.None) + {.#None}) (case (ffi.check php/runtime/memory/ObjectMemory value) - {#.Some value} + {.#Some value} value - #.None) + {.#None}) (undefined) )) @@ -243,10 +243,10 @@ php/runtime/Memory (`` (<| (~~ (template [<class> <method> <extractor>] [(case (ffi.check <class> index) - {#.Some index} + {.#Some index} (<method> trace (<extractor> index) self) - #.None)] + {.#None})] [php/runtime/memory/ReferenceMemory php/runtime/Memory::generic_valueOfIndex @@ -283,10 +283,10 @@ (^ (static runtime.variant_flag_field)) (case (array.read! 1 value) - #.None + {.#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 + {.#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,10 +357,10 @@ (:as php/runtime/memory/ReferenceMemory) php/runtime/memory/ReferenceMemory::getValue (ffi.check php/runtime/memory/NullMemory)) - {#.Some _} + {.#Some _} (ffi.null) - #.None + {.#None} synthesis.unit)) value]} @@ -376,37 +376,37 @@ Reader (`` (<| (~~ (template [<class> <constant>] [(case (ffi.check <class> host_object) - {#.Some _} - {#try.Success <constant>} + {.#Some _} + {try.#Success <constant>} - #.None)] + {.#None})] [php/runtime/memory/FalseMemory false] [php/runtime/memory/TrueMemory true] )) (~~ (template [<class> <post>] [(case (ffi.check <class> host_object) - {#.Some value} + {.#Some value} (`` (|> value (~~ (template.splice <post>)))) - #.None)] + {.#None})] - [program/StructureValue [program/StructureValue::getValue #try.Success]] - [php/runtime/memory/LongMemory [php/runtime/memory/LongMemory::toLong #try.Success]] - [php/runtime/memory/DoubleMemory [php/runtime/memory/DoubleMemory::toDouble #try.Success]] - [php/runtime/memory/StringMemory [php/runtime/memory/StringMemory::toString #try.Success]] + [program/StructureValue [program/StructureValue::getValue {try.#Success}]] + [php/runtime/memory/LongMemory [php/runtime/memory/LongMemory::toLong {try.#Success}]] + [php/runtime/memory/DoubleMemory [php/runtime/memory/DoubleMemory::toDouble {try.#Success}]] + [php/runtime/memory/StringMemory [php/runtime/memory/StringMemory::toString {try.#Success}]] [php/runtime/memory/ReferenceMemory [php/runtime/memory/ReferenceMemory::getValue read]] - [php/runtime/memory/ObjectMemory [#try.Success]] + [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)) - #.None) + {.#None}) (exception.throw ..unknown_kind_of_object host_object) ))) @@ -457,10 +457,10 @@ (def: (expander macro inputs lux) Expander (case (ensure_macro macro) - {#.Some macro} + {.#Some macro} (call_macro inputs lux macro) - #.None + {.#None} (exception.throw ..cannot_apply_a_non_function (:as java/lang/Object macro)))) (def: host @@ -501,11 +501,11 @@ (IO (Platform [Nat _.Label] _.Expression _.Statement)) (do io.monad [host ..host] - (wrap [#platform.&file_system (file.async file.default) - #platform.host host - #platform.phase php.generate - #platform.runtime runtime.generate - #platform.write (|>> _.code (\ utf8.codec encoded))]))) + (wrap [platform.#&file_system (file.async file.default) + platform.#host host + platform.#phase php.generate + platform.#runtime runtime.generate + platform.#write (|>> _.code (\ utf8.codec encoded))]))) (def: (program context program) (Program _.Expression _.Statement) @@ -558,10 +558,10 @@ (do io.monad [platform ..platform] (exec (do promise.monad - [_ (/.compiler [#/static.host @.php - #/static.host_module_extension extension - #/static.target (/cli.target service) - #/static.artifact_extension extension] + [_ (/.compiler [/static.#host @.php + /static.#host_module_extension extension + /static.#target (/cli.target service) + /static.#artifact_extension extension] ..expander analysis.bundle (io.io platform) |