diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2019-01-07 20:43:52 -0800 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2019-01-07 20:43:52 -0800 |
| commit | 712b9bd68231e367f0c3c088f4837029537a80d0 (patch) | |
| tree | 422ab50ca49e428c76c2f1b71bebb909ffc679d1 /core | |
| parent | f0fc8c0cf6b1961fc7142b69ce151925df92ddc8 (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.nom | 11 |
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()) |
