diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-18 01:27:56 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-18 01:28:17 -0700 |
| commit | d5cfaa37be9e278c44a25ef448a071390597306e (patch) | |
| tree | 7fbe78b5153bb9c761c283533943ab80da3a1844 /core/scopes.nom | |
| parent | c7c657d38f999901225b33482ef3a15994526feb (diff) | |
Upgrading to version 2.3 (main change: "=" instead of "<-" for
assignment)
Diffstat (limited to 'core/scopes.nom')
| -rw-r--r-- | core/scopes.nom | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/core/scopes.nom b/core/scopes.nom index 256ddd5..2be24e6 100644 --- a/core/scopes.nom +++ b/core/scopes.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V2.2.4.3 +#!/usr/bin/env nomsu -V2.3.4.3 # This file contains definitions pertaining to variable scoping @@ -7,21 +7,18 @@ use "core/operators.nom" use "core/collections.nom" use "core/control_flow.nom" compile [with local %locals %body, with local %locals do %body] to: - %body_lua <- (%body as lua statements) + %body_lua = (%body as lua statements) when %locals.type = ?: * "Dict": - %body_lua <- (Lua "\(compile as (<- %locals))\n\%body_lua") + %body_lua = (..) + Lua "\(compile as (<- %locals))\n\%body_lua" + declare locals ("\(%.1 as lua)" for % in %locals) in %body_lua - * "List": - declare locals ("\(% as lua)" for % in %locals) in %body_lua + * "List": declare locals ("\(% as lua)" for % in %locals) in %body_lua * "Var" - * "Action": - declare locals ["\(%locals as lua)"] in %body_lua + * "Action": declare locals ["\(%locals as lua)"] in %body_lua *else (barf "Unexpected local: \(%locals as nomsu)") return (..) - Lua ".." - do - \%body_lua - end + Lua "do\n \%body_lua\nend"
\ No newline at end of file |
