diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-12-13 15:21:45 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-12-13 15:21:55 -0800 |
| commit | 0d88091f8d6cba8c552e2d3ffd3551819f8a4aed (patch) | |
| tree | 1381e42637e0921f4362f3b9a200b716e02c4fbb /core | |
| parent | efd743591e555e63dce7dd351e1e80bb38848669 (diff) | |
Cleanups and codegen improvements/fixes.
Diffstat (limited to 'core')
| -rw-r--r-- | core/control_flow.nom | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/core/control_flow.nom b/core/control_flow.nom index ccf11de..eca92ce 100644 --- a/core/control_flow.nom +++ b/core/control_flow.nom @@ -174,13 +174,14 @@ test: if (%body has subtree \(do next %var)): %lua::add "\n " (\(---next %var ---) as lua) - %lua::add "\nend --numeric for-loop" + %lua::add "\nend -- numeric for " (%var as lua identifier) " loop" if (%body has subtree \(stop %var)): - %inner_lua = %lua - %lua = (Lua "do -- scope for stopping for-loop\n ") - %lua::add %inner_lua "\n " - %lua::add (\(---stop %var ---) as lua) - %lua::add "\nend -- end of scope for stopping for-loop" + %lua = (..) + Lua "\ + ..do -- scope for (stop \(%var as lua identifier)) + \%lua + \(\(---stop %var ---) as lua) + end -- scope for (stop \(%var as lua identifier))" return %lua ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
