Add -- support to locals.
This commit is contained in:
@ -150,9 +150,9 @@ $(GEN):
|
|||||||
|
|
||||||
POSIX_BOOT = common/boot.fs common/conditionals.fs common/vocabulary.fs \
|
POSIX_BOOT = common/boot.fs common/conditionals.fs common/vocabulary.fs \
|
||||||
common/hide_calls.fs common/ansi.fs \
|
common/hide_calls.fs common/ansi.fs \
|
||||||
posix/posix.fs posix/posix_highlevel.fs posix/termios.fs common/locals.fs \
|
posix/posix.fs posix/posix_highlevel.fs posix/termios.fs \
|
||||||
common/tasks.fs common/utils.fs common/highlevel.fs common/filetools.fs \
|
common/tasks.fs common/utils.fs common/highlevel.fs common/filetools.fs \
|
||||||
posix/posix_desktop.fs \
|
common/locals.fs posix/posix_desktop.fs \
|
||||||
common/streams.fs common/blocks.fs \
|
common/streams.fs common/blocks.fs \
|
||||||
posix/sockets.fs posix/telnetd.fs posix/httpd.fs posix/web_interface.fs \
|
posix/sockets.fs posix/telnetd.fs posix/httpd.fs posix/web_interface.fs \
|
||||||
posix/autoboot.fs \
|
posix/autoboot.fs \
|
||||||
|
|||||||
@ -34,10 +34,15 @@ scope-doer scope-template
|
|||||||
: (local) ( a n -- )
|
: (local) ( a n -- )
|
||||||
>r >r postpone >r postpone ahead r> r> scope-create postpone then ;
|
>r >r postpone >r postpone ahead r> r> scope-create postpone then ;
|
||||||
: }? ( a n -- ) 1 <> if drop 0 exit then c@ [char] } = ;
|
: }? ( a n -- ) 1 <> if drop 0 exit then c@ [char] } = ;
|
||||||
|
: --? ( a n -- ) s" --" str= ;
|
||||||
|
: eat} begin bl parse }? until ;
|
||||||
|
|
||||||
also forth definitions
|
also forth definitions
|
||||||
|
|
||||||
: { begin bl parse 2dup }? if 2drop exit then (local) again ; immediate
|
: { begin bl parse
|
||||||
|
2dup --? if 2drop eat} exit then
|
||||||
|
2dup }? if 2drop exit then
|
||||||
|
(local) again ; immediate
|
||||||
: ; scope-clear postpone ; ; immediate
|
: ; scope-clear postpone ; ; immediate
|
||||||
|
|
||||||
only forth definitions
|
only forth definitions
|
||||||
|
|||||||
@ -36,3 +36,8 @@ e: test-longname
|
|||||||
: setPixelColor { pixelNum } pixelNum ;
|
: setPixelColor { pixelNum } pixelNum ;
|
||||||
1 setPixelColor 1 = assert
|
1 setPixelColor 1 = assert
|
||||||
;e
|
;e
|
||||||
|
|
||||||
|
e: test-dash
|
||||||
|
: test { a b c -- a a b b c c } a a b b c c ;
|
||||||
|
1 2 3 test * + * + * 23 = assert
|
||||||
|
;e
|
||||||
|
|||||||
Reference in New Issue
Block a user