public class KotlinStatementSubRecognizer extends RecognizerBase<EKotlinParserStates>
NO_MATCH, tailRecognizers
Constructor and Description |
---|
KotlinStatementSubRecognizer(RecognizerBase<EKotlinParserStates> subExpressionRecognizer,
java.util.List<ETokenType> openingBrackets,
java.util.List<ETokenType> closingBrackets)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getRecognizerStringRepresentation()
Returns the default string representation of this recognizer: its short class
name.
|
protected int |
matchesLocally(ParserState<EKotlinParserStates> parserState,
java.util.List<IToken> tokens,
int startOffset)
Attempts to match the recognizer locally (without respecting tail
recognizers).
|
createNode, createNode, createNode, debug, endNode, endNodeWithContinuation, endNodeWithContinuation, endNodeWithName, ensureTopLevel, markStart, matches, notPreCondition, optional, optionalSubRecognizer, parseOnce, parseStrictlyUntil, parseUntil, parseUntilOrEof, preCondition, repeated, repeatedAtLeastOnce, repeatedSubRecognizer, sequence, sequenceBefore, skipAny, skipBefore, skipBeforeWithNesting, skipBeforeWithNesting, skipBeforeWithNesting, skipBeforeWithNesting, skipBeforeWithNesting, skipBeforeWithNesting, skipForward, skipNested, skipNested, skipTo, skipToWithNesting, skipToWithNesting, skipToWithNesting, skipToWithNesting, skipWithNesting, skipWithNesting, subRecognizer, subRecognizer, toString
public KotlinStatementSubRecognizer(RecognizerBase<EKotlinParserStates> subExpressionRecognizer, java.util.List<ETokenType> openingBrackets, java.util.List<ETokenType> closingBrackets)
subExpressionRecognizer
- Recognizer to be used to find nested lambdas etc. in the statementopeningBrackets
- List of opening brackets, which are skippedclosingBrackets
- List of closing brackets, which are skippedprotected int matchesLocally(ParserState<EKotlinParserStates> parserState, java.util.List<IToken> tokens, int startOffset)
matchesLocally
in class RecognizerBase<EKotlinParserStates>
parserState
- the current state of the underlying parser.tokens
- the list of tokens.startOffset
- the current offset into the tokens from where to start matching.RecognizerBase.NO_MATCH
if matching was not possible at this position.protected java.lang.String getRecognizerStringRepresentation()
RecognizerBase.toString()
to ease debugging. May be overwritten by
subclasses to provide better debugging information.
This default implementation is sufficient for all recognizers that don't take
any arguments. Other recognizers should overwrite this to make their
arguments visible to the debugging user if they are helpful.getRecognizerStringRepresentation
in class RecognizerBase<EKotlinParserStates>