mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-27 19:48:08 +11:00
3d908cef3a
This allows us to get rid of the (parse*) indirection.
12 lines
308 B
Plaintext
12 lines
308 B
Plaintext
( strings being sent to parse routines are always null
|
|
terminated )
|
|
|
|
: (parsec) ( a -- n f )
|
|
( apostrophe is ASCII 39 )
|
|
DUP C@ 39 = OVER 2+ C@ 39 = AND ( a f )
|
|
NOT IF 0 EXIT THEN ( a 0 )
|
|
( surrounded by apos, good, return )
|
|
1+ C@ 1 ( n 1 )
|
|
;
|
|
|