#!/usr/bin/env nomsu -V4.8.10 # This file contains basic input/output code use "core/metaprogramming.nom" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (say %message) compiles to: lua> "\ ..if \%message.type == "Text" then return LuaCode("print(", \(%message as lua expr), ");"); else return LuaCode("print(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())"); else return LuaCode("(io.write(tostring(", \(..) %prompt as lua expr .., ")) and io.read())"); end"