diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-08 16:30:21 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-08 16:30:21 -0800 |
| commit | 1914249e3bd23063bdddb5569a3c70e431343dcd (patch) | |
| tree | 370c6672edea3c4dc36e7aff840f31fad46adfe7 | |
| parent | 2048d4468acf4720c38eabe5644e9f112cea5478 (diff) | |
Made (external $x = $y) work using ($x = $y), so e.g. (external
[$x, $y] = [1, 2]) now works properly.
| -rw-r--r-- | core/operators.nom | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/operators.nom b/core/operators.nom index fa37a11..4d72643 100644 --- a/core/operators.nom +++ b/core/operators.nom @@ -84,7 +84,10 @@ test: $y = "inner" set global x local y 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: [$foozle, $y] = ["outer", "outer"] externally (set global x local y) means: |
