validateType method

bool validateType(
  1. ComputeContext ctx,
  2. TokenType? previousTokenType,
  3. String rawBuildingToken,
  4. TokenType? nextTokenType,
)

Signals the caller if the token type is compatible with the next and previous types of tokens.

Implementation

bool validateType(ComputeContext ctx, TokenType? previousTokenType,
    String rawBuildingToken, TokenType? nextTokenType) {
  return validatePreviousType(ctx, rawBuildingToken, previousTokenType) &&
      validateNextType(ctx, rawBuildingToken, nextTokenType);
}