Class InnerLiteral
java.lang.Object
com.oracle.truffle.regex.tregex.parser.ast.InnerLiteral
Represents a literal string inside the regular expression that can be searched for before
starting the actual regular expression matcher.
-
Constructor Summary
ConstructorsConstructorDescriptionInnerLiteral(AbstractString literal, AbstractString mask, int maxPrefixSize) -
Method Summary
Modifier and TypeMethodDescriptionThe literal string.com.oracle.truffle.api.strings.TruffleStringgetMask()An optional mask for matching the string in ignore-case mode.com.oracle.truffle.api.strings.TruffleString.WithMaskintThe maximum number of code points the regular expression may match before matching this literal.booleanhasMask()
-
Constructor Details
-
InnerLiteral
-
-
Method Details
-
getLiteral
The literal string. -
getLiteralContent
public com.oracle.truffle.api.strings.TruffleString getLiteralContent() -
getMask
An optional mask for matching the string in ignore-case mode. -
getMaskContent
public com.oracle.truffle.api.strings.TruffleString.WithMask getMaskContent() -
hasMask
public boolean hasMask() -
getMaxPrefixSize
public int getMaxPrefixSize()The maximum number of code points the regular expression may match before matching this literal. Example: the inner literal of/a?b/is"b", with a max prefix size of1. If there are loops in the prefix, returns-1.
-