validateNext method
bool
validateNext(
- ComputeContext ctx,
- String rawBuildingToken,
- Token<
TokenType> ? nextToken
override
Signals the caller if the token type is compatible with the next token.
Implementation
@override
bool validateNext(ComputeContext ctx, String rawBuildingToken,
Token<TokenType>? nextToken) {
if (!super.validateNext(ctx, rawBuildingToken, nextToken)) {
return false;
}
return nextToken == null ||
(nextToken is OperatorToken &&
nextToken.operator.precedence == Precedence.additive);
}