operator << method

ProductionRuleExpression<E> operator <<(
  1. Expression<E> expression
)

Implementation

ProductionRuleExpression<E> operator <<(Expression<E> expression) {
  if (expression is SequenceExpression<E>) {
    expressions.add(expression);
  } else {
    final sequence = SequenceFirstResultExpression(expression, const []);
    expressions.add(sequence);
  }

  return this;
}