add [COMPILE], fix :NONAME

optimize
Clyne 11 months ago
parent 79a15b78b1
commit ddba135e7d
Signed by: clyne
GPG Key ID: 3267C8EBF3F9AFC7

@ -15,7 +15,7 @@ Alee Forth uses the [Forth 2012 test suite](https://github.com/gerryjackson/fort
**Missing** core extension words:
```
PARSE PARSE-NAME REFILL RESTORE-INPUT S\" SAVE-INPUT SOURCE-ID [COMPILE]
PARSE PARSE-NAME REFILL RESTORE-INPUT S\" SAVE-INPUT SOURCE-ID
```
## Building

@ -17,6 +17,7 @@
: 2r@ ['] r> , ['] r> , ['] 2dup , ['] >r , ['] >r , ['] swap , ; imm
: compile, postpone literal postpone execute ;
: [compile] bl word find -1 = if , else compile, then ; imm
: \ _source @ >in @ +
begin dup c@ while 0 over c! char+ repeat drop ; imm
: again postpone repeat ; imm

@ -198,7 +198,7 @@
else dup emit rot 2dup c! char+ swap drop swap 1- then
repeat drop r> - 1 chars / ;
: :noname 0 , here ] ;
: :noname here 0 , here swap ] ;
: evaluate _source @ >r _sourceu @ >r >in @ >r
0 >in ! _sourceu ! _source ! _ev

Loading…
Cancel
Save