new accessors
parent
3eaa63b03a
commit
3d88fec7e5
|
@ -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 -- ? )
|
||||||
|
|
Loading…
Reference in New Issue