From 8a3c32408733a2f5e14f8a2dbafa3f980b2f73a1 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 30 Dec 2018 19:04:34 -0800 Subject: Update to new syntax. --- tools/repl.nom | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'tools/repl.nom') diff --git a/tools/repl.nom b/tools/repl.nom index 3f1eff3..49a4d3d 100644 --- a/tools/repl.nom +++ b/tools/repl.nom @@ -1,4 +1,4 @@ -#!/usr/bin/env nomsu -V5.12.12.8 +#!/usr/bin/env nomsu -V6.12.12.8 # This file defines a Read-Evaluate-Print-Loop (REPL) for Nomsu @@ -9,16 +9,18 @@ use "lib/os.nom" externally [quit, exit] all mean: lua> "os.exit(0)" externally (help) means: - say " + say (" This is the Nomsu v\(Nomsu version) interactive console. You can type in Nomsu code here and hit 'enter' twice to run it. - To exit, type 'exit' or 'quit' and hit enter twice." + To exit, type 'exit' or 'quit' and hit enter twice. + ") -say " +say (" \(bright)\(underscore)Welcome to the Nomsu v\(Nomsu version) interactive console!\(reset color) press 'enter' twice to run a command - " + +") repeat: say (bright (yellow ">> ")) inline @@ -32,11 +34,13 @@ repeat: # clear the line say "\027[1A\027[2K" inline go to (run buffer) - $buff|add ($line|with "\t" -> " ") + $buff, add ($line, with "\t" -> " ") say (dim (yellow ".. ")) inline + --- (run buffer) --- + if ((size of $buff) == 0): stop - $buff = ($buff|joined) + $buff = ($buff, joined) # TODO: support local variables spoof file $buff @@ -53,7 +57,7 @@ repeat: "table": if $ret.as_nomsu: - say "= \($ret|as nomsu)" + say "= \($ret, as nomsu)" ..else: say "= \$ret" -- cgit v1.2.3