modern: Support one: 1 two:: 1 2 three::: 1 2 3 syntax
Also M\ 1 M\\ 1 2 M\\\ { { { etcmodern-harvey2
parent
b3bd9b1215
commit
083d08878a
|
@ -141,8 +141,9 @@ MACRO:: read-matched ( ch -- quot: ( n string tag -- n' string slice' ) )
|
||||||
ERROR: token-expected n string obj ;
|
ERROR: token-expected n string obj ;
|
||||||
ERROR: unexpected-terminator n string slice ;
|
ERROR: unexpected-terminator n string slice ;
|
||||||
: read-lowercase-colon ( n string slice -- n' string lowercase-colon )
|
: read-lowercase-colon ( n string slice -- n' string lowercase-colon )
|
||||||
[
|
dup [ char: \: = ] count-tail
|
||||||
lex-factor dup [ token-expected ] unless
|
'[
|
||||||
|
_ [ lex-factor ] replicate dup [ token-expected ] unless
|
||||||
dup terminator? [ unexpected-terminator ] when
|
dup terminator? [ unexpected-terminator ] when
|
||||||
] dip swap 2array ;
|
] dip swap 2array ;
|
||||||
|
|
||||||
|
@ -210,8 +211,9 @@ ERROR: no-backslash-payload n string slice ;
|
||||||
: read-backslash ( n string slice -- n' string obj )
|
: read-backslash ( n string slice -- n' string obj )
|
||||||
merge-slice-til-whitespace dup "\\" tail? [
|
merge-slice-til-whitespace dup "\\" tail? [
|
||||||
! \ foo, M\ foo
|
! \ foo, M\ foo
|
||||||
[
|
dup [ char: \\ = ] count-tail
|
||||||
skip-blank-from slice-til-whitespace drop
|
'[
|
||||||
|
_ [ skip-blank-from slice-til-whitespace drop ] replicate
|
||||||
dup [ no-backslash-payload ] unless
|
dup [ no-backslash-payload ] unless
|
||||||
] dip swap 2array
|
] dip swap 2array
|
||||||
] when ;
|
] when ;
|
||||||
|
|
Loading…
Reference in New Issue