mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 01:28:06 +11:00
3aa681ceca
The ":" now takes care of scanning for ";". Conceptually, having ";" as an immediate word is slightly simpler than the approach in this commit, but when bootstrapping is involved, this simpler approach gets murkier. Moreover, it got even murkier-er when trying to de-stabilize EXIT, so here we are.
16 lines
371 B
Plaintext
16 lines
371 B
Plaintext
: X:
|
|
(xentry) 1 ( compiled ) C,
|
|
BEGIN
|
|
WORD DUP LIT" ;" S= IF DROP 0x0b , EXIT THEN
|
|
XCURRENT @ SWAP ( xcur w ) _find ( a f )
|
|
IF ( a )
|
|
DUP IMMED? IF ABORT THEN
|
|
_xapply ,
|
|
ELSE ( w )
|
|
0x02 RAM+ @ SWAP ( cur w ) _find ( a f )
|
|
IF DUP IMMED? NOT IF ABORT THEN EXECUTE
|
|
ELSE (parse) XLITN THEN
|
|
THEN
|
|
AGAIN
|
|
;
|