diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-10-30 23:42:04 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-10-30 23:42:36 -0700 |
| commit | ea3197aaffba00318920ed5e1e33ca5f2a5e6c5c (patch) | |
| tree | 2ec4aff13c7a54a3730994525b591ac60528b5ad /core/coroutines.nom | |
| parent | e7e84c9eda38c930f5475301de4a449dcf59e8b6 (diff) | |
Fully working version of (action [foo]: baz) -> ((foo) means: baz)
refactor and misc other changes.
Diffstat (limited to 'core/coroutines.nom')
| -rw-r--r-- | core/coroutines.nom | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/coroutines.nom b/core/coroutines.nom index e7ec41e..246a2ef 100644 --- a/core/coroutines.nom +++ b/core/coroutines.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.8.8.6 +#!/usr/bin/env nomsu -V4.8.10 # This file defines the code that creates and manipulates coroutines @@ -14,15 +14,15 @@ test: for % in coroutine %co: %nums::add % assume (%nums == [4, 5, 6, 6, 6]) or barf "Coroutine iteration failed" -compile [coroutine %body, generator %body] to (..) +[coroutine %body, generator %body] all compile to (..) Lua value "\ ..(function() \(%body as lua statements) end)" -compile [->] to (Lua value "coroutine.yield(true)") -compile [-> %] to (Lua value "coroutine.yield(true, \(% as lua expr))") -compile [for % in coroutine %co %body] to (..) +(->) compiles to (Lua value "coroutine.yield(true)") +(-> %) compiles to (Lua value "coroutine.yield(true, \(% as lua expr))") +(for % in coroutine %co %body) compiles to (..) Lua "\ ..for junk,\(% as lua expr) in coroutine.wrap(\(%co as lua expr)) do \(%body as lua statements) |
