package mb.nabl2.regexp.impl;

import org.immutables.serial.Serial;
import org.immutables.value.Value;

import mb.nabl2.regexp.IRegExp;

@Value.Immutable
@Serial.Version(value = 42L)
abstract class AConcat<S> implements IRegExp<S> {

    @Value.Parameter public abstract IRegExp<S> getLeft();

    @Value.Parameter public abstract IRegExp<S> getRight();

    @Override public <T> T match(IRegExp.ICases<S, T> visitor) {
        return visitor.concat(getLeft(), getRight());
    }

    @Override public String toString() {
        return "(" + getLeft() + " . " + getRight() + ")";
    }

}
@@ -553,10 +553,8 @@
  + %22
- .
  %22 +

Improve toString.