diff options
author | Eduardo Julian | 2023-01-13 16:14:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2023-01-13 16:14:20 -0400 |
commit | 913171900fd11272ca328ded6553a56423db1e13 (patch) | |
tree | e101c51aa5b4467eed4e7b956d2d941cd46f4b10 /lux-c++/source | |
parent | 617069b3986e9271d6e73191b899aa914e430dd6 (diff) |
Can now compile complex values (i.e. variants & tuples) in C++.
Diffstat (limited to 'lux-c++/source')
-rw-r--r-- | lux-c++/source/program.lux | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/lux-c++/source/program.lux b/lux-c++/source/program.lux index 3c3a037fc..26e6bde0d 100644 --- a/lux-c++/source/program.lux +++ b/lux-c++/source/program.lux @@ -29,12 +29,13 @@ ["[0]" file] ["[1]/[0]" environment]] [meta - [target - ["_" c++]] [macro ["^" pattern] ["[0]" template]] [compiler + [target + ["_" c++ (.only) + [":" type]]] [reference [variable (.only Register)]] [language @@ -54,7 +55,8 @@ [c++ ["[0]" runtime] ["[0]" type] - ["[0]" primitive]]]]]] + ["[0]" primitive] + ["[0]" complex]]]]]] [default ["[0]" platform (.only Platform)]] [meta @@ -94,22 +96,12 @@ (_.function (_.local <say_hello>) (list) (list) - _.void + :.void (all _.then - ... (print (primitive.bit true)) - ... (print (primitive.i64 +123)) - ... (print (primitive.f64 -456.789)) - ... (print (primitive.text "YOLO")) - - ... (print (runtime.lux_value type.bit (primitive.bit true))) - ... (print (runtime.lux_value type.i64 (primitive.i64 +123))) - ... (print (runtime.lux_value type.f64 (primitive.f64 -456.789))) - ... (print (runtime.lux_value type.text (primitive.text "YOLO"))) - - ... (print (_.deref (runtime.host_value type.bit (runtime.lux_value type.bit (primitive.bit true))))) - (print (_.deref (runtime.host_value type.i64 (runtime.lux_value type.i64 (primitive.i64 +123))))) - ... (print (_.deref (runtime.host_value type.f64 (runtime.lux_value type.f64 (primitive.f64 -456.789))))) - ... (print (_.deref (runtime.host_value type.text (runtime.lux_value type.text (primitive.text "YOLO"))))) + (print (_.deref (runtime.host_value type.bit (runtime.simple type.bit (primitive.bit true))))) + (print (_.deref (runtime.host_value type.i64 (runtime.simple type.i64 (primitive.i64 +123))))) + (print (_.deref (runtime.host_value type.f64 (runtime.simple type.f64 (primitive.f64 -456.789))))) + ... (print (_.deref (runtime.host_value type.text (runtime.simple type.text (primitive.text "YOLO"))))) ))))]) .let [_ (debug.log! (%.format "BEFORE " (%.bit ?)))] global (cppyy::gbl) |