From 6728587dfc6a5f4090f2673113ffedb2be924daf Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 20 Jul 2018 20:27:15 -0700 Subject: Auto-formatted and auto-upgraded everything! --- core/coroutines.nom | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/coroutines.nom') 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))") -- cgit v1.2.3