modern: Handle #foo vs foo# vs #

modern-harvey3
Doug Coleman 2019-10-28 19:12:41 -05:00
parent ce06202d1a
commit 5618440e2b
1 changed files with 6 additions and 1 deletions

View File

@ -332,8 +332,13 @@ MACRO:: read-matched ( ch -- quot: ( string n tag -- string n' slice' ) )
: read-acute ( string n slice -- string n' acute )
[ matching-section-delimiter 1array lex-until ] keep swap unclip-last 3array ;
! #{ } turned off, foo# not turned off
: read-turnoff ( string n slice -- string n' obj )
[ lex-factor ] dip swap 2array ;
dup { [ "#" head? ] [ "#" sequence= not ] } 1&& [
[ lex-factor ] dip swap 2array
] [
merge-slice-til-whitespace
] if ;
! Words like append! and suffix! are allowed for now.
: read-exclamation ( string n slice -- string n' obj )