diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-17 23:08:13 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-07-17 23:08:24 -0700 |
| commit | ba639f2bd05f47e08c12198b7b20cd4cf371b25f (patch) | |
| tree | 656fcb15a27e642f891fba24046e01b4f139ab52 /core/io.nom | |
| parent | 854b2a652ff473c9d2eaa3222008d4baed36ae63 (diff) | |
Upgraded core code to latest Nomsu verison.
Diffstat (limited to 'core/io.nom')
| -rw-r--r-- | core/io.nom | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/io.nom b/core/io.nom index 55c5702..e04c88b 100644 --- a/core/io.nom +++ b/core/io.nom @@ -1,10 +1,9 @@ -#!/usr/bin/env nomsu -V1 +#!/usr/bin/env nomsu -V2.2.4.3 # This file contains basic input/output code use "core/metaprogramming.nom" - -compile [say %message] to +compile [say %message] to (..) lua> ".." if \%message.type == "Text" then return LuaCode(tree.source, "print(", \(%message as lua expr), ");"); @@ -12,10 +11,10 @@ compile [say %message] to return LuaCode(tree.source, "print(tostring(", \(%message as lua expr), "));"); end -compile [ask %prompt] to +compile [ask %prompt] to (..) lua> ".." if \%prompt.type == "Text" then return LuaCode.Value(tree.source, "(io.write(", \(%prompt as lua expr), ") and io.read())"); else return LuaCode.Value(tree.source, "(io.write(tostring(", \(%prompt as lua expr), ")) and io.read())"); - end + end
\ No newline at end of file |
