Made (external $x = $y) work using ($x = $y), so e.g. (external

[$x, $y] = [1, 2]) now works properly.
This commit is contained in:
Bruce Hill 2019-01-08 16:30:21 -08:00
parent 2048d4468a
commit 1914249e3b

View File

@ -84,7 +84,10 @@ test:
$y = "inner" $y = "inner"
set global x local y set global x local y
unless (($foozle == "inner") and ($y == "outer")): fail "external failed." unless (($foozle == "inner") and ($y == "outer")): fail "external failed."
(external $var = $value) compiles to "\($var as lua) = \($value as lua)" (external $var = $value) compiles to:
$lua = ((SyntaxTree {.type = "Action", .source = $var.source, .1 = $var, .2 = "=", .3 = $value}) as lua)
$lua, remove free vars
return $lua
test: test:
[$foozle, $y] = ["outer", "outer"] [$foozle, $y] = ["outer", "outer"]
externally (set global x local y) means: externally (set global x local y) means: