RuleTagToken constructor

RuleTagToken(
  1. String ruleName,
  2. int bypassTokenType, [
  3. String? label
])

Constructs a new instance of RuleTagToken with the specified rule name, bypass token type, and label.

@param ruleName The name of the parser rule this rule tag matches. @param bypassTokenType The bypass token type assigned to the parser rule. @param label The label associated with the rule tag, or null if the rule tag is unlabeled.

@exception ArgumentError.value(value) if ruleName is null or empty.

Implementation

RuleTagToken(this.ruleName, this.bypassTokenType, [this.label]) {
  if (ruleName.isEmpty) {
    throw ArgumentError.value(
      ruleName,
      'ruleName',
      'cannot be empty.',
    );
  }
}