Started new stdin UX
This commit is contained in:
parent
eee55d5c6d
commit
452b5026be
|
@ -11,6 +11,6 @@
|
||||||
<> (?x dup) (?x ?x)
|
<> (?x dup) (?x ?x)
|
||||||
<> (?x ?y swap) (?y ?x)
|
<> (?x ?y swap) (?y ?x)
|
||||||
<> (?x pop) ()
|
<> (?x pop) ()
|
||||||
<> (print ?:) (?:)
|
<> (print ?:) ()
|
||||||
|
|
||||||
(implode reverse (explode hello)) (explode hello) empty-register (eq abc abc) (eq abc def) (1 2 3) (4 5 6) swap pop dup (hey 1234 pop) (print Done.)
|
(implode reverse (explode hello)) (explode hello) empty-register (eq abc abc) (eq abc def) (1 2 3) (4 5 6) swap pop dup (hey 1234 pop) (print Done.)
|
1
makefile
1
makefile
|
@ -9,7 +9,6 @@ dest:
|
||||||
@ mkdir -p bin
|
@ mkdir -p bin
|
||||||
run: all bin/modal
|
run: all bin/modal
|
||||||
@ bin/modal examples/hello.modal 2> /dev/null
|
@ bin/modal examples/hello.modal 2> /dev/null
|
||||||
@ bin/modal examples/test.modal
|
|
||||||
test: bin/modal-debug bin/modal
|
test: bin/modal-debug bin/modal
|
||||||
@ bin/modal -v
|
@ bin/modal -v
|
||||||
@ bin/modal-debug examples/test.modal "(arg1) (arg2 (arg3))"
|
@ bin/modal-debug examples/test.modal "(arg1) (arg2 (arg3))"
|
||||||
|
|
|
@ -73,7 +73,11 @@ put_reg(char r)
|
||||||
char *s = regs[(int)r];
|
char *s = regs[(int)r];
|
||||||
if(r == '*')
|
if(r == '*')
|
||||||
s = plode(s);
|
s = plode(s);
|
||||||
else if(s) {
|
else if(r == '~') {
|
||||||
|
char buf;
|
||||||
|
while(fread(&buf, 1, 1, stdin) && buf >= ' ')
|
||||||
|
*outp_++ = buf;
|
||||||
|
} else if(s) {
|
||||||
char *ss = walk(s);
|
char *ss = walk(s);
|
||||||
if(r == ':') {
|
if(r == ':') {
|
||||||
if(*s == '(') s++, --ss;
|
if(*s == '(') s++, --ss;
|
||||||
|
|
Loading…
Reference in New Issue