matchesAny method

  1. @override
bool matchesAny(
  1. List<TokenType> types
)
inherited

Return true if this token has any one of the given types.

Implementation

@override
bool matchesAny(List<TokenType> types) {
  // [type] is a getter that accesses [_tokenTypesByIndex]:
  TokenType type = this.type;
  for (TokenType t in types) {
    if (type == t) {
      return true;
    }
  }
  return false;
}