aboutsummaryrefslogtreecommitdiff
path: root/lux-lua
diff options
context:
space:
mode:
Diffstat (limited to 'lux-lua')
-rw-r--r--lux-lua/source/program.lux42
1 files changed, 21 insertions, 21 deletions
diff --git a/lux-lua/source/program.lux b/lux-lua/source/program.lux
index bedd9dbb8..66620007d 100644
--- a/lux-lua/source/program.lux
+++ b/lux-lua/source/program.lux
@@ -371,7 +371,7 @@
$b2 (_.var "b2")
$b3 (_.var "b3")
$b4 (_.var "b4")
- table/insert (_.apply/2 (_.var "table.insert"))]
+ table/insert (function (_ in/0 in/1) (_.apply (list in/0 in/1) (_.var "table.insert")))]
(_.function (_.var "utf8.char") (list $var_args)
($_ _.then
(_.local/1 $buffer (_.array (list)))
@@ -386,30 +386,30 @@
(<| (_.if (_.< (!int "80") $v)
... Single-byte sequence
(_.statement (|> (_.var "string.char")
- (_.apply/* (list $v))
+ (_.apply (list $v))
(table/insert $buffer))))
(_.if (_.< (!int "800") $v)
... Two-byte sequence
(_.statement (|> (_.var "string.char")
- (_.apply/* (list (!&|< "C0" "1F" +6 $v)
- (!&| "80" "3F" $v)))
+ (_.apply (list (!&|< "C0" "1F" +6 $v)
+ (!&| "80" "3F" $v)))
(table/insert $buffer))))
(_.if (_.< (!int "10000") $v)
... Three-byte sequence
(_.statement (|> (_.var "string.char")
- (_.apply/* (list (!&|< "E0" "0F" +12 $v)
- (!&|< "80" "3F" +6 $v)
- (!&| "80" "3F" $v)))
+ (_.apply (list (!&|< "E0" "0F" +12 $v)
+ (!&|< "80" "3F" +6 $v)
+ (!&| "80" "3F" $v)))
(table/insert $buffer))))
... Four-byte sequence
(_.statement (|> (_.var "string.char")
- (_.apply/* (list (!&|< "F0" "07" +18 $v)
- (!&|< "80" "3F" +12 $v)
- (!&|< "80" "3F" +6 $v)
- (!&| "80" "3F" $v)))
+ (_.apply (list (!&|< "F0" "07" +18 $v)
+ (!&|< "80" "3F" +12 $v)
+ (!&|< "80" "3F" +6 $v)
+ (!&| "80" "3F" $v)))
(table/insert $buffer))))
))
- (_.return (_.apply/2 (_.var "table.concat") $buffer (_.string "")))
+ (_.return (_.apply (list $buffer (_.string "")) (_.var "table.concat")))
))))
... (def: rembulan//str_rel_to_abs
@@ -429,7 +429,7 @@
... (_.> (_.length $string) $v))
... (_.statement (_.error/2 (_.string "bad index to string (out of range)") (_.int +3))))
... (_.set (list (_.nth $k $args)) $v)))
- ... (_.return (_.apply/1 (_.var "table.unpack") $args))
+ ... (_.return (_.apply (list $args) (_.var "table.unpack")))
... ))))
... (def: rembulan//decode
@@ -441,7 +441,7 @@
... $end (_.var "_end")]
... (<| (_.local_function $decode (list $string $start))
... ($_ _.then
- ... (_.set (list $start) (_.apply/2 $str_rel_to_abs $string (_.or (_.int +1) $start)))
+ ... (_.set (list $start) (_.apply (list $string (_.or (_.int +1) $start)) $str_rel_to_abs))
... (_.local/1 $b1 (_.do "byte" (list $start $start) $string))
... (<| (_.if (_.< (!int "80") $b1)
... ... Single-byte sequence
@@ -481,7 +481,7 @@
... (_.if (_.> (_.length $string) $i)
... (_.return _.nil)
... ($_ _.then
- ... (_.let (list $start $end) (_.apply/2 $decode $string $i))
+ ... (_.let (list $start $end) (_.apply (list $string $i) $decode))
... (_.if (_.not $start)
... (_.statement (_.error/2 (_.string "invalid UTF-8 code") (_.int +2)))
... ($_ _.then
@@ -500,14 +500,14 @@
... $size (_.var "size")]
... (_.function (_.var "utf8.len") (list $string $start $end)
... ($_ _.then
- ... (_.set (list $start $end) (_.apply/3 $str_rel_to_abs $string (_.or (_.int +1) $start) (_.or (_.int -1) $end)))
+ ... (_.set (list $start $end) (_.apply (list $string (_.or (_.int +1) $start) (_.or (_.int -1) $end)) $str_rel_to_abs))
... (_.local/1 $size (_.int +0))
... (_.repeat (_.>= $end $seq_end)
... ($_ _.then
- ... (_.let (list $seq_start $seq_end) (_.apply/2 $decode $string $start))
+ ... (_.let (list $seq_start $seq_end) (_.apply (list $string $start) $decode))
... (_.if (_.not $seq_start)
... ... Hit an invalid sequence!
- ... (_.return (_.multi (list (_.bool false) $start)))
+ ... (_.return (_.multi (list (_.boolean false) $start)))
... ($_ _.then
... (_.set (list $start) (_.+ (_.int +1) $seq_end))
... (_.set (list $size) (_.+ (_.int +1) $size))
@@ -799,9 +799,9 @@
(def: (program context program)
(Program _.Expression _.Statement)
(let [$program (_.var (reference.artifact context))]
- (_.statement (_.apply/* (list (runtime.lux//program_args (_.var "arg"))
- runtime.unit)
- program))))
+ (_.statement (_.apply (list (runtime.lux//program_args (_.var "arg"))
+ runtime.unit)
+ program))))
(def: (declare_success! _)
(-> Any (Async Any))