TokenType constructor

const TokenType(
  1. int index,
  2. String lexeme,
  3. String name,
  4. int precedence,
  5. int kind, {
  6. TokenType? binaryOperatorOfCompoundAssignment,
  7. bool isBinaryOperator = false,
  8. bool isModifier = false,
  9. bool isOperator = false,
  10. bool isTopLevelKeyword = false,
  11. bool isUserDefinableOperator = false,
  12. String? stringValue = 'unspecified',
})

Implementation

const TokenType(
    this.index, this.lexeme, this.name, this.precedence, this.kind,
    {this.binaryOperatorOfCompoundAssignment,
    this.isBinaryOperator = false,
    this.isModifier = false,
    this.isOperator = false,
    this.isTopLevelKeyword = false,
    this.isUserDefinableOperator = false,
    String? stringValue = 'unspecified'})
    : this.stringValue = stringValue == 'unspecified' ? lexeme : stringValue;