From 712b9bd68231e367f0c3c088f4837029537a80d0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 7 Jan 2019 20:43:52 -0800 Subject: Switched "ask" to be a proper function so it works as either an expression or a statement. --- core/io.nom | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/io.nom b/core/io.nom index f1abe32..0084834 100644 --- a/core/io.nom +++ b/core/io.nom @@ -24,11 +24,6 @@ use "core/metaprogramming.nom" end ") -(ask $prompt) compiles to: - lua> (" - if \$prompt.type == "Text" then - return LuaCode("(io.write(", \($prompt as lua expr), ") and io.read())"); - else - return LuaCode("(io.write(tostring(", \($prompt as lua expr), ")) and io.read())"); - end - ") +externally (ask $prompt) means: + $io.write $prompt + return ($io.read()) -- cgit v1.2.3