aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2019-01-07 20:43:52 -0800
committerBruce Hill <bruce@bruce-hill.com>2019-01-07 20:43:52 -0800
commit712b9bd68231e367f0c3c088f4837029537a80d0 (patch)
tree422ab50ca49e428c76c2f1b71bebb909ffc679d1 /core
parentf0fc8c0cf6b1961fc7142b69ce151925df92ddc8 (diff)
Switched "ask" to be a proper function so it works as either an
expression or a statement.
Diffstat (limited to 'core')
-rw-r--r--core/io.nom11
1 files 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())