diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-20 20:27:15 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-20 20:27:27 -0700 |
| commit | 6728587dfc6a5f4090f2673113ffedb2be924daf (patch) | |
| tree | 77591abacd8760bedaa30110570613ef263220fe /core/coroutines.nom | |
| parent | c9df1bc3e881b2ebcf5808a0db7bea29cd07c849 (diff) | |
Auto-formatted and auto-upgraded everything!
Diffstat (limited to 'core/coroutines.nom')
| -rw-r--r-- | core/coroutines.nom | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/coroutines.nom b/core/coroutines.nom index bff115d..52467c1 100644 --- a/core/coroutines.nom +++ b/core/coroutines.nom @@ -1,10 +1,14 @@ -#!/usr/bin/env nomsu -V2.4.4.3 +#!/usr/bin/env nomsu -V2.5.4.3 # This file defines the code that creates and manipulates coroutines use "core/metaprogramming.nom" + compile [coroutine %body, generator %body] to (..) - Lua value "(function()\n \(%body as lua statements)\nend)" + 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))") |
