Class RegExpTree.Repetition
java.lang.Object
com.google.javascript.jscomp.regex.RegExpTree
com.google.javascript.jscomp.regex.RegExpTree.Repetition
- Enclosing class:
RegExpTree
Represents a repeating item such as ...+, ...*, or ...{0,1}
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.javascript.jscomp.regex.RegExpTree
RegExpTree.Alternation, RegExpTree.Anchor, RegExpTree.BackReference, RegExpTree.CapturingGroup, RegExpTree.Charset, RegExpTree.Concatenation, RegExpTree.Empty, RegExpTree.LookaheadAssertion, RegExpTree.LookbehindAssertion, RegExpTree.NamedBackReference, RegExpTree.NamedCaptureGroup, RegExpTree.RegExpTreeAtom, RegExpTree.Repetition, RegExpTree.Text, RegExpTree.UnicodePropertyEscape, RegExpTree.WordBoundary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected void
Appends this regular expression source to the given buffer.com.google.common.collect.ImmutableList
<? extends RegExpTree> children()
The children of this node.boolean
True if the regular expression contains an anchor :^
or$
.boolean
int
hashCode()
boolean
True if the presence or absence of an"i"
flag would change the meaning of this regular expression.int
The number of capturing groups.Returns a simpler regular expression that is semantically the same assuming the given flags.Methods inherited from class com.google.javascript.jscomp.regex.RegExpTree
hasCapturingGroup, matchesWholeInput, parseRegExp, toString
-
Method Details
-
simplify
Description copied from class:RegExpTree
Returns a simpler regular expression that is semantically the same assuming the given flags.- Specified by:
simplify
in classRegExpTree
- Parameters:
flags
- Regular expression flags, e.g."igm"
.
-
isCaseSensitive
public boolean isCaseSensitive()Description copied from class:RegExpTree
True if the presence or absence of an"i"
flag would change the meaning of this regular expression.- Specified by:
isCaseSensitive
in classRegExpTree
-
containsAnchor
public boolean containsAnchor()Description copied from class:RegExpTree
True if the regular expression contains an anchor :^
or$
.- Specified by:
containsAnchor
in classRegExpTree
-
numCapturingGroups
public int numCapturingGroups()Description copied from class:RegExpTree
The number of capturing groups.- Specified by:
numCapturingGroups
in classRegExpTree
-
children
Description copied from class:RegExpTree
The children of this node.- Specified by:
children
in classRegExpTree
-
appendSourceCode
Description copied from class:RegExpTree
Appends this regular expression source to the given buffer.- Specified by:
appendSourceCode
in classRegExpTree
-
appendDebugInfo
- Specified by:
appendDebugInfo
in classRegExpTree
-
equals
- Specified by:
equals
in classRegExpTree
-
hashCode
public int hashCode()- Specified by:
hashCode
in classRegExpTree
-