diff options
Diffstat (limited to 'jefs.fs')
| -rw-r--r-- | jefs.fs | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,7 +1,6 @@ \ i think something is going on with the stack. i dunno \ things TODO: \ EVALUATE -\ CASE \ DO LOOP \ <builds does> \ argc/argv @@ -53,6 +52,12 @@ hex : ret, c3 c, ; decimal : ?dup dup 0<> if dup then ; +\ jonesforth impl +: case 0 ; immediate +: of ' over compile, ' = compile, [compile] if ' drop compile, ; immediate +: endof [compile] else ; immediate +: endcase ' drop compile, begin ?dup while [compile] then repeat ; immediate + \ TODO interpret mode strings? \ i think s" causes stack underflow : s" 1 >in +! [ char " ] literal cparse branch >mark >r 2dup cmove, r> >resolve swap [compile] lit [compile] lit ; immediate @@ -191,5 +196,5 @@ variable hld \ : teststr3 s" 1 2 3 .s" ; \ \ teststr3 evaluate -.free +t .free bye |
