From 4fe63f253f58f87ab986fea38902d95f2a5ea338 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Fri, 14 Dec 2018 20:21:03 -0800 Subject: Auto-updated to version 5 --- core/io.nom | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'core/io.nom') diff --git a/core/io.nom b/core/io.nom index 8f22b07..4bf2028 100644 --- a/core/io.nom +++ b/core/io.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V4.12.12.8 +#!/usr/bin/env nomsu -V5.12.12.8 # This file contains basic input/output code @@ -6,26 +6,26 @@ use "core/metaprogramming.nom" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -(say %message) compiles to: - lua> "\ - ..if \%message.type == "Text" then - return LuaCode("say(", \(%message as lua expr), ");"); +(say $message) compiles to: + lua> " + if \$message.type == "Text" then + return LuaCode("say(", \($message as lua expr), ");"); else - return LuaCode("say(tostring(", \(%message as lua expr), "));"); + return LuaCode("say(tostring(", \($message as lua expr), "));"); end" -(say %message inline) compiles to: - lua> "\ - ..if \%message.type == "Text" then - return LuaCode("io.write(", \(%message as lua expr), ")"); +(say $message inline) compiles to: + lua> " + if \$message.type == "Text" then + return LuaCode("io.write(", \($message as lua expr), ")"); else - return LuaCode("io.write(tostring(", \(%message as lua expr), "))"); + return LuaCode("io.write(tostring(", \($message as lua expr), "))"); end" -(ask %prompt) compiles to: - lua> "\ - ..if \%prompt.type == "Text" then - return LuaCode("(io.write(", \(%prompt as lua expr), ") and io.read())"); +(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())"); + return LuaCode("(io.write(tostring(", \($prompt as lua expr), ")) and io.read())"); end" -- cgit v1.2.3