new accessors

db4
Doug Coleman 2008-08-30 21:59:30 -05:00
parent 3eaa63b03a
commit 3d88fec7e5
1 changed files with 4 additions and 4 deletions

View File

@ -270,14 +270,14 @@ TUPLE: regexp source parser ignore-case? ;
] keep regexp boa ; ] keep regexp boa ;
: do-ignore-case ( string regexp -- string regexp ) : do-ignore-case ( string regexp -- string regexp )
dup regexp-ignore-case? [ >r >upper r> ] when ; dup ignore-case?>> [ >r >upper r> ] when ;
: matches? ( string regexp -- ? ) : matches? ( string regexp -- ? )
do-ignore-case regexp-parser just parse nil? not ; do-ignore-case parser>> just parse nil? not ;
: match-head ( string regexp -- end ) : match-head ( string regexp -- end )
do-ignore-case regexp-parser parse dup nil? do-ignore-case parser>> parse dup nil?
[ drop f ] [ car parse-result-unparsed from>> ] if ; [ drop f ] [ car unparsed>> from>> ] if ;
! Literal syntax for regexps ! Literal syntax for regexps
: parse-options ( string -- ? ) : parse-options ( string -- ? )