Skip to content

Commit b18d13a

Browse files
committed
parsed to with +> and &> for +to and addr
1 parent 6c2d967 commit b18d13a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

parsedto.fs

+9-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@
2222
: rec:to ( addr u -- xt r:to | r:fail )
2323
\G words prefixed with @code{->} are treated as if preceeded by
2424
\G @code{TO} or @code{IS}
25-
2dup s" ->" string-prefix? 0= IF 2drop r:fail EXIT THEN
26-
2 /string dup 0= IF 2drop r:fail EXIT THEN
27-
recognize dup r:fail = ?EXIT
25+
dup 3 u< IF 2drop r:fail EXIT THEN
26+
over 1+ c@ '>' <> IF 2drop r:fail EXIT THEN
27+
case over c@
28+
'-' of 0 to-style# ! endof
29+
'+' of 1 to-style# ! endof
30+
'&' of -1 to-style# ! endof
31+
drop 2drop r:fail EXIT
32+
endcase
33+
2 /string recognize dup r:fail = IF to-style# off EXIT THEN
2834
name?int r:to ;
2935

3036
' rec:to get-recognizers 1+ set-recognizers

0 commit comments

Comments
 (0)