visitSubterminal<E> method

  1. @override
Expression visitSubterminal<E>(
  1. Subterminal<E> node
)
override

Implementation

@override
Expression visitSubterminal<E>(Subterminal<E> node) {
  var rule = _rules[node] as SubterminalRule<E>?;
  if (rule == null) {
    rule = SubterminalRule<E>(node.name);
    _rules[node] = rule;
    final expression =
        visitOrderedChoice<E>(node) as OrderedChoiceExpression<E>;
    rule.expression = expression;
    expression.rule = rule;
  }

  final symbol = SubterminalSymbol<E>();
  _addCaller(rule, symbol);
  return symbol;
}