improve repl
This commit is contained in:
parent
c3fffb1e75
commit
c45c538952
1 changed files with 4 additions and 5 deletions
|
@ -1,6 +1,4 @@
|
|||
|
||||
func !!-cat { | }
|
||||
|
||||
func main { mega | with args ;
|
||||
"Welcome to the SPL REPL!" println
|
||||
"Enter any code after the cursor to execute it.\n" println
|
||||
|
@ -12,13 +10,14 @@ func main { mega | with args ;
|
|||
while { line is-complete not } {
|
||||
def s
|
||||
line " > " print readln =s
|
||||
s "!!-cat" eq dup if { line println }
|
||||
not if { s "\n" concat concat =line }
|
||||
s "\n" concat concat =line
|
||||
}
|
||||
line _barray =line
|
||||
line:sub<0 line:len 1 -> _str =line
|
||||
"!!-end" line:contains if {
|
||||
2 stop
|
||||
}
|
||||
"!!-cat" line:contains if {
|
||||
"\n" line:contains if {
|
||||
"" println
|
||||
line print
|
||||
"." println
|
||||
|
|
Loading…
Add table
Reference in a new issue