TokenType constructor

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

Implementation

const TokenType(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;