module Regexp::Expression::Shared
def is?(test_token, test_type = nil)
exp.is? :dot, [:meta, :escape]
# is it a :meta or :escape :dot
exp.is? :dot, :meta
# is it a :meta :dot
exp.is? :character, :set
# is it a :character and a :set
exp.is? :capture
# is it a :capture
exp.is? :* # always returns true
# Any expressions
test_type.
Test if this expression has the given test_token, and optionally a given
def is?(test_token, test_type = nil) return true if test_token === :* token == test_token and (test_type ? type?(test_type) : true) end