public interface RegexParser
| Modifier and Type | Method and Description |
|---|---|
AbstractRegexObject |
getFlags()
Returns a
TruffleObject representing the compilation flags which were set for the
regular expression. |
AbstractRegexObject |
getNamedCaptureGroups()
Returns a map from the names of capture groups to their indices.
|
RegexAST |
parse()
Runs the parser and produces an AST.
|
RegexAST parse() throws RegexSyntaxException, UnsupportedRegexException
RegexSyntaxException - when the pattern or the flags are not well-formedUnsupportedRegexException - when the pattern cannot be translated to an equivalent
ECMAScript patternAbstractRegexObject getFlags()
TruffleObject representing the compilation flags which were set for the
regular expression. The returned object responds to 'READ' messages on names which correspond
to the names of the flags as used in the language from which the flavor originates. This
method has to be called after calling RegexParser.parse().AbstractRegexObject getNamedCaptureGroups()
RegexParser.parse().