Class PythonFlags
java.lang.Object
com.oracle.truffle.regex.AbstractRegexObject
com.oracle.truffle.regex.AbstractConstantKeysObject
com.oracle.truffle.regex.tregex.parser.flavors.PythonFlags
- All Implemented Interfaces:
com.oracle.truffle.api.interop.TruffleObject
An immutable representation of a set of Python regular expression flags.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.oracle.truffle.regex.AbstractConstantKeysObject
AbstractConstantKeysObject.IsMemberReadable, AbstractConstantKeysObject.ReadMember -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFlag(int flagChar) addFlags(PythonFlags otherFlags) delFlags(PythonFlags otherFlags) booleanfixFlags(RegexSource source, PythonREMode mode) Verifies that there is at most one type flag and that the type flag is compatible with the chosen regular expression mode.getKeys()inthashCode()booleanbooleanisAscii()booleanisDotAll()booleanbooleanisLocale()booleanisMemberReadableImpl(String symbol) booleanbooleanstatic booleanisTypeFlagChar(int candidateChar) booleanisUnicode(PythonREMode mode) Returnstrueif the Unicode flag is set or if it would be set by default.booleanstatic booleanisValidFlagChar(int candidateChar) booleanintbooleanoverlaps(PythonFlags otherFlags) readMemberImpl(String symbol) toDisplayString(boolean allowSideEffects) toString()Methods inherited from class com.oracle.truffle.regex.AbstractConstantKeysObject
getMembers, hasMembersMethods inherited from class com.oracle.truffle.regex.AbstractRegexObject
createNamedCaptureGroupMapInt, createNamedCaptureGroupMapListInt, getLanguage, hasLanguage
-
Field Details
-
EMPTY_INSTANCE
-
TYPE_FLAGS_INSTANCE
-
-
Constructor Details
-
PythonFlags
-
-
Method Details
-
isIgnoreCase
public boolean isIgnoreCase() -
isLocale
public boolean isLocale() -
isMultiLine
public boolean isMultiLine() -
isDotAll
public boolean isDotAll() -
isVerbose
public boolean isVerbose() -
isAscii
public boolean isAscii() -
isTemplate
public boolean isTemplate() -
isUnicodeExplicitlySet
public boolean isUnicodeExplicitlySet() -
isUnicode
Returnstrueif the Unicode flag is set or if it would be set by default. -
addFlag
-
addFlags
-
delFlags
-
fixFlags
Verifies that there is at most one type flag and that the type flag is compatible with the chosen regular expression mode. If a string pattern is used, ensures that the unicode flag is set by default. -
isValidFlagChar
public static boolean isValidFlagChar(int candidateChar) -
isTypeFlagChar
public static boolean isTypeFlagChar(int candidateChar) -
numberOfTypeFlags
public int numberOfTypeFlags() -
includesGlobalFlags
public boolean includesGlobalFlags() -
overlaps
-
equals
-
hashCode
-
toString
-
toDisplayString
- Overrides:
toDisplayStringin classAbstractRegexObject
-
getKeys
- Specified by:
getKeysin classAbstractConstantKeysObject
-
isMemberReadableImpl
- Specified by:
isMemberReadableImplin classAbstractConstantKeysObject
-
readMemberImpl
public Object readMemberImpl(String symbol) throws com.oracle.truffle.api.interop.UnknownIdentifierException - Specified by:
readMemberImplin classAbstractConstantKeysObject- Throws:
com.oracle.truffle.api.interop.UnknownIdentifierException
-