// Generated by delombok at Sun Apr 02 07:47:34 ICT 2017
package ast;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
import java.util.function.Function;
import ast.Ast.Atom;
import ast.Ast.HasPos;
import ast.Ast.Position;
import ast.Ast.SignalKind;
import ast.Ast.Type;
import ast.Ast.VarDec;
public interface Expression extends Ast {
<T> T accept(sugarVisitors.Visitor<T> v);
final class Signal implements Expression {
private final SignalKind kind;
private final Expression inner;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"kind", "inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Signal(final SignalKind kind, final Expression inner) {
this.kind = kind;
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SignalKind getKind() {
return this.kind;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.Signal)) return false;
final Signal other = (Signal)o;
final java.lang.Object this$kind = this.getKind();
final java.lang.Object other$kind = other.getKind();
if (this$kind == null ? other$kind != null : !this$kind.equals(other$kind)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $kind = this.getKind();
result = result * PRIME + ($kind == null ? 0 : $kind.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.Signal(kind=" + this.getKind() + ", inner=" + this.getInner() + ")";
}
}
final class Loop implements Expression {
private final Expression inner;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Loop(final Expression inner) {
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.Loop)) return false;
final Loop other = (Loop)o;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.Loop(inner=" + this.getInner() + ")";
}
}
final class If implements Expression, HasPos {
private final Position p;
private final Expression cond;
private final Expression then;
private final Optional<Expression> _else;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "cond", "then", "_else"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public If(final Position p, final Expression cond, final Expression then, final Optional<Expression> _else) {
this.p = p;
this.cond = cond;
this.then = then;
this._else = _else;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getCond() {
return this.cond;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getThen() {
return this.then;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Optional<Expression> get_else() {
return this._else;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.If)) return false;
final If other = (If)o;
final java.lang.Object this$cond = this.getCond();
final java.lang.Object other$cond = other.getCond();
if (this$cond == null ? other$cond != null : !this$cond.equals(other$cond)) return false;
final java.lang.Object this$then = this.getThen();
final java.lang.Object other$then = other.getThen();
if (this$then == null ? other$then != null : !this$then.equals(other$then)) return false;
final java.lang.Object this$_else = this.get_else();
final java.lang.Object other$_else = other.get_else();
if (this$_else == null ? other$_else != null : !this$_else.equals(other$_else)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $cond = this.getCond();
result = result * PRIME + ($cond == null ? 0 : $cond.hashCode());
final java.lang.Object $then = this.getThen();
result = result * PRIME + ($then == null ? 0 : $then.hashCode());
final java.lang.Object $_else = this.get_else();
result = result * PRIME + ($_else == null ? 0 : $_else.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.If(cond=" + this.getCond() + ", then=" + this.getThen() + ", _else=" + this.get_else() + ")";
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public If withP(final Position p) {
return this.p == p ? this : new If(p, this.cond, this.then, this._else);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public If withCond(final Expression cond) {
return this.cond == cond ? this : new If(this.p, cond, this.then, this._else);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public If withThen(final Expression then) {
return this.then == then ? this : new If(this.p, this.cond, then, this._else);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public If with_else(final Optional<Expression> _else) {
return this._else == _else ? this : new If(this.p, this.cond, this.then, _else);
}
}
final class While implements Expression, HasPos {
private final Position p;
private final Expression cond;
private final Expression then;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "cond", "then"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public While(final Position p, final Expression cond, final Expression then) {
this.p = p;
this.cond = cond;
this.then = then;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getCond() {
return this.cond;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getThen() {
return this.then;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.While)) return false;
final While other = (While)o;
final java.lang.Object this$cond = this.getCond();
final java.lang.Object other$cond = other.getCond();
if (this$cond == null ? other$cond != null : !this$cond.equals(other$cond)) return false;
final java.lang.Object this$then = this.getThen();
final java.lang.Object other$then = other.getThen();
if (this$then == null ? other$then != null : !this$then.equals(other$then)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $cond = this.getCond();
result = result * PRIME + ($cond == null ? 0 : $cond.hashCode());
final java.lang.Object $then = this.getThen();
result = result * PRIME + ($then == null ? 0 : $then.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.While(cond=" + this.getCond() + ", then=" + this.getThen() + ")";
}
}
final class With implements Expression, HasPos {
private final Position p;
private final List<String> xs;
private final List<VarDecXE> is;
private final List<VarDecXE> decs;
private final List<On> ons;
private final Optional<Expression> defaultE;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
public static final class On {
private final List<Type> ts;
private final Expression inner;
@java.beans.ConstructorProperties({"ts", "inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public On(final List<Type> ts, final Expression inner) {
this.ts = ts;
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<Type> getTs() {
return this.ts;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.With.On)) return false;
final On other = (On)o;
final java.lang.Object this$ts = this.getTs();
final java.lang.Object other$ts = other.getTs();
if (this$ts == null ? other$ts != null : !this$ts.equals(other$ts)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $ts = this.getTs();
result = result * PRIME + ($ts == null ? 0 : $ts.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.With.On(ts=" + this.getTs() + ", inner=" + this.getInner() + ")";
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public On withTs(final List<Type> ts) {
return this.ts == ts ? this : new On(ts, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public On withInner(final Expression inner) {
return this.inner == inner ? this : new On(this.ts, inner);
}
}
@java.beans.ConstructorProperties({"p", "xs", "is", "decs", "ons", "defaultE"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public With(final Position p, final List<String> xs, final List<VarDecXE> is, final List<VarDecXE> decs, final List<On> ons, final Optional<Expression> defaultE) {
this.p = p;
this.xs = xs;
this.is = is;
this.decs = decs;
this.ons = ons;
this.defaultE = defaultE;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<String> getXs() {
return this.xs;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<VarDecXE> getIs() {
return this.is;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<VarDecXE> getDecs() {
return this.decs;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<On> getOns() {
return this.ons;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Optional<Expression> getDefaultE() {
return this.defaultE;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.With)) return false;
final With other = (With)o;
final java.lang.Object this$xs = this.getXs();
final java.lang.Object other$xs = other.getXs();
if (this$xs == null ? other$xs != null : !this$xs.equals(other$xs)) return false;
final java.lang.Object this$is = this.getIs();
final java.lang.Object other$is = other.getIs();
if (this$is == null ? other$is != null : !this$is.equals(other$is)) return false;
final java.lang.Object this$decs = this.getDecs();
final java.lang.Object other$decs = other.getDecs();
if (this$decs == null ? other$decs != null : !this$decs.equals(other$decs)) return false;
final java.lang.Object this$ons = this.getOns();
final java.lang.Object other$ons = other.getOns();
if (this$ons == null ? other$ons != null : !this$ons.equals(other$ons)) return false;
final java.lang.Object this$defaultE = this.getDefaultE();
final java.lang.Object other$defaultE = other.getDefaultE();
if (this$defaultE == null ? other$defaultE != null : !this$defaultE.equals(other$defaultE)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $xs = this.getXs();
result = result * PRIME + ($xs == null ? 0 : $xs.hashCode());
final java.lang.Object $is = this.getIs();
result = result * PRIME + ($is == null ? 0 : $is.hashCode());
final java.lang.Object $decs = this.getDecs();
result = result * PRIME + ($decs == null ? 0 : $decs.hashCode());
final java.lang.Object $ons = this.getOns();
result = result * PRIME + ($ons == null ? 0 : $ons.hashCode());
final java.lang.Object $defaultE = this.getDefaultE();
result = result * PRIME + ($defaultE == null ? 0 : $defaultE.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.With(xs=" + this.getXs() + ", is=" + this.getIs() + ", decs=" + this.getDecs() + ", ons=" + this.getOns() + ", defaultE=" + this.getDefaultE() + ")";
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public With withP(final Position p) {
return this.p == p ? this : new With(p, this.xs, this.is, this.decs, this.ons, this.defaultE);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public With withXs(final List<String> xs) {
return this.xs == xs ? this : new With(this.p, xs, this.is, this.decs, this.ons, this.defaultE);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public With withIs(final List<VarDecXE> is) {
return this.is == is ? this : new With(this.p, this.xs, is, this.decs, this.ons, this.defaultE);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public With withDecs(final List<VarDecXE> decs) {
return this.decs == decs ? this : new With(this.p, this.xs, this.is, decs, this.ons, this.defaultE);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public With withOns(final List<On> ons) {
return this.ons == ons ? this : new With(this.p, this.xs, this.is, this.decs, ons, this.defaultE);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public With withDefaultE(final Optional<Expression> defaultE) {
return this.defaultE == defaultE ? this : new With(this.p, this.xs, this.is, this.decs, this.ons, defaultE);
}
}
final class X implements Expression, Ast.Atom, HasPos {
private final Position p;
private final String inner;
public String toString() {
return this.inner;
}
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public X(final Position p, final String inner) {
this.p = p;
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public String getInner() {
return this.inner;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.X)) return false;
final X other = (X)o;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
}
final class ContextId implements Expression, Ast.Atom {
private final String inner;//contains the "\"
public String toString() {
return this.inner;
}
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ContextId(final String inner) {
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public String getInner() {
return this.inner;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.ContextId)) return false;
final ContextId other = (ContextId)o;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
}
/*@ToString(exclude = "p")*/
final class BinOp implements Expression, HasPos {
private final Position p;
private final Expression left;
private final Ast.Op op;
private final Expression right;
public String toString() {
return "(" + left + op.inner + right + ")";
}
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "left", "op", "right"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public BinOp(final Position p, final Expression left, final Ast.Op op, final Expression right) {
this.p = p;
this.left = left;
this.op = op;
this.right = right;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getLeft() {
return this.left;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Ast.Op getOp() {
return this.op;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getRight() {
return this.right;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.BinOp)) return false;
final BinOp other = (BinOp)o;
final java.lang.Object this$left = this.getLeft();
final java.lang.Object other$left = other.getLeft();
if (this$left == null ? other$left != null : !this$left.equals(other$left)) return false;
final java.lang.Object this$op = this.getOp();
final java.lang.Object other$op = other.getOp();
if (this$op == null ? other$op != null : !this$op.equals(other$op)) return false;
final java.lang.Object this$right = this.getRight();
final java.lang.Object other$right = other.getRight();
if (this$right == null ? other$right != null : !this$right.equals(other$right)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $left = this.getLeft();
result = result * PRIME + ($left == null ? 0 : $left.hashCode());
final java.lang.Object $op = this.getOp();
result = result * PRIME + ($op == null ? 0 : $op.hashCode());
final java.lang.Object $right = this.getRight();
result = result * PRIME + ($right == null ? 0 : $right.hashCode());
return result;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public BinOp withP(final Position p) {
return this.p == p ? this : new BinOp(p, this.left, this.op, this.right);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public BinOp withLeft(final Expression left) {
return this.left == left ? this : new BinOp(this.p, left, this.op, this.right);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public BinOp withOp(final Ast.Op op) {
return this.op == op ? this : new BinOp(this.p, this.left, op, this.right);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public BinOp withRight(final Expression right) {
return this.right == right ? this : new BinOp(this.p, this.left, this.op, right);
}
}
final class DocE implements Expression {
private final Expression inner;
private final Doc doc;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"inner", "doc"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public DocE(final Expression inner, final Doc doc) {
this.inner = inner;
this.doc = doc;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc() {
return this.doc;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.DocE)) return false;
final DocE other = (DocE)o;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
final java.lang.Object this$doc = this.getDoc();
final java.lang.Object other$doc = other.getDoc();
if (this$doc == null ? other$doc != null : !this$doc.equals(other$doc)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
final java.lang.Object $doc = this.getDoc();
result = result * PRIME + ($doc == null ? 0 : $doc.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.DocE(inner=" + this.getInner() + ", doc=" + this.getDoc() + ")";
}
}
/*@ToString(exclude = "p")*/
final class UnOp implements Expression, HasPos {
private final Position p;
private final Ast.Op op;
private final Expression inner;
public String toString() {
return "(" + op.inner + inner + ")";
}
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "op", "inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public UnOp(final Position p, final Ast.Op op, final Expression inner) {
this.p = p;
this.op = op;
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Ast.Op getOp() {
return this.op;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.UnOp)) return false;
final UnOp other = (UnOp)o;
final java.lang.Object this$op = this.getOp();
final java.lang.Object other$op = other.getOp();
if (this$op == null ? other$op != null : !this$op.equals(other$op)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $op = this.getOp();
result = result * PRIME + ($op == null ? 0 : $op.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
}
final class MCall implements Expression, HasPos, HasReceiver {
private final Expression receiver;
private final String name;
private final Doc doc;
private final Parameters ps;
private final Position p;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"receiver", "name", "doc", "ps", "p"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MCall(final Expression receiver, final String name, final Doc doc, final Parameters ps, final Position p) {
this.receiver = receiver;
this.name = name;
this.doc = doc;
this.ps = ps;
this.p = p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getReceiver() {
return this.receiver;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public String getName() {
return this.name;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc() {
return this.doc;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Parameters getPs() {
return this.ps;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MCall withReceiver(final Expression receiver) {
return this.receiver == receiver ? this : new MCall(receiver, this.name, this.doc, this.ps, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MCall withName(final String name) {
return this.name == name ? this : new MCall(this.receiver, name, this.doc, this.ps, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MCall withDoc(final Doc doc) {
return this.doc == doc ? this : new MCall(this.receiver, this.name, doc, this.ps, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MCall withPs(final Parameters ps) {
return this.ps == ps ? this : new MCall(this.receiver, this.name, this.doc, ps, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MCall withP(final Position p) {
return this.p == p ? this : new MCall(this.receiver, this.name, this.doc, this.ps, p);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.MCall)) return false;
final MCall other = (MCall)o;
final java.lang.Object this$receiver = this.getReceiver();
final java.lang.Object other$receiver = other.getReceiver();
if (this$receiver == null ? other$receiver != null : !this$receiver.equals(other$receiver)) return false;
final java.lang.Object this$name = this.getName();
final java.lang.Object other$name = other.getName();
if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
final java.lang.Object this$doc = this.getDoc();
final java.lang.Object other$doc = other.getDoc();
if (this$doc == null ? other$doc != null : !this$doc.equals(other$doc)) return false;
final java.lang.Object this$ps = this.getPs();
final java.lang.Object other$ps = other.getPs();
if (this$ps == null ? other$ps != null : !this$ps.equals(other$ps)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $receiver = this.getReceiver();
result = result * PRIME + ($receiver == null ? 0 : $receiver.hashCode());
final java.lang.Object $name = this.getName();
result = result * PRIME + ($name == null ? 0 : $name.hashCode());
final java.lang.Object $doc = this.getDoc();
result = result * PRIME + ($doc == null ? 0 : $doc.hashCode());
final java.lang.Object $ps = this.getPs();
result = result * PRIME + ($ps == null ? 0 : $ps.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.MCall(receiver=" + this.getReceiver() + ", name=" + this.getName() + ", doc=" + this.getDoc() + ", ps=" + this.getPs() + ")";
}
}
final class FCall implements Expression, HasPos, HasReceiver {
@NonNull
private final Position p;
private final Expression receiver;
private final Doc doc;
private final Parameters ps;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "receiver", "doc", "ps"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public FCall(@NonNull final Position p, final Expression receiver, final Doc doc, final Parameters ps) {
if (p == null) {
throw new java.lang.NullPointerException("p");
}
this.p = p;
this.receiver = receiver;
this.doc = doc;
this.ps = ps;
}
@NonNull
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getReceiver() {
return this.receiver;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc() {
return this.doc;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Parameters getPs() {
return this.ps;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public FCall withP(@NonNull final Position p) {
if (p == null) {
throw new java.lang.NullPointerException("p");
}
return this.p == p ? this : new FCall(p, this.receiver, this.doc, this.ps);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public FCall withReceiver(final Expression receiver) {
return this.receiver == receiver ? this : new FCall(this.p, receiver, this.doc, this.ps);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public FCall withDoc(final Doc doc) {
return this.doc == doc ? this : new FCall(this.p, this.receiver, doc, this.ps);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public FCall withPs(final Parameters ps) {
return this.ps == ps ? this : new FCall(this.p, this.receiver, this.doc, ps);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.FCall)) return false;
final FCall other = (FCall)o;
final java.lang.Object this$receiver = this.getReceiver();
final java.lang.Object other$receiver = other.getReceiver();
if (this$receiver == null ? other$receiver != null : !this$receiver.equals(other$receiver)) return false;
final java.lang.Object this$doc = this.getDoc();
final java.lang.Object other$doc = other.getDoc();
if (this$doc == null ? other$doc != null : !this$doc.equals(other$doc)) return false;
final java.lang.Object this$ps = this.getPs();
final java.lang.Object other$ps = other.getPs();
if (this$ps == null ? other$ps != null : !this$ps.equals(other$ps)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $receiver = this.getReceiver();
result = result * PRIME + ($receiver == null ? 0 : $receiver.hashCode());
final java.lang.Object $doc = this.getDoc();
result = result * PRIME + ($doc == null ? 0 : $doc.hashCode());
final java.lang.Object $ps = this.getPs();
result = result * PRIME + ($ps == null ? 0 : $ps.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.FCall(receiver=" + this.getReceiver() + ", doc=" + this.getDoc() + ", ps=" + this.getPs() + ")";
}
}
final class SquareCall implements Expression, HasPos, HasReceiver {
private final Position p;
private final Expression receiver;
private final Doc doc;
private final List<Doc> docs;
private final List<Parameters> pss;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "receiver", "doc", "docs", "pss"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareCall(final Position p, final Expression receiver, final Doc doc, final List<Doc> docs, final List<Parameters> pss) {
this.p = p;
this.receiver = receiver;
this.doc = doc;
this.docs = docs;
this.pss = pss;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getReceiver() {
return this.receiver;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc() {
return this.doc;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<Doc> getDocs() {
return this.docs;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<Parameters> getPss() {
return this.pss;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareCall withP(final Position p) {
return this.p == p ? this : new SquareCall(p, this.receiver, this.doc, this.docs, this.pss);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareCall withReceiver(final Expression receiver) {
return this.receiver == receiver ? this : new SquareCall(this.p, receiver, this.doc, this.docs, this.pss);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareCall withDoc(final Doc doc) {
return this.doc == doc ? this : new SquareCall(this.p, this.receiver, doc, this.docs, this.pss);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareCall withDocs(final List<Doc> docs) {
return this.docs == docs ? this : new SquareCall(this.p, this.receiver, this.doc, docs, this.pss);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareCall withPss(final List<Parameters> pss) {
return this.pss == pss ? this : new SquareCall(this.p, this.receiver, this.doc, this.docs, pss);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.SquareCall)) return false;
final SquareCall other = (SquareCall)o;
final java.lang.Object this$receiver = this.getReceiver();
final java.lang.Object other$receiver = other.getReceiver();
if (this$receiver == null ? other$receiver != null : !this$receiver.equals(other$receiver)) return false;
final java.lang.Object this$doc = this.getDoc();
final java.lang.Object other$doc = other.getDoc();
if (this$doc == null ? other$doc != null : !this$doc.equals(other$doc)) return false;
final java.lang.Object this$docs = this.getDocs();
final java.lang.Object other$docs = other.getDocs();
if (this$docs == null ? other$docs != null : !this$docs.equals(other$docs)) return false;
final java.lang.Object this$pss = this.getPss();
final java.lang.Object other$pss = other.getPss();
if (this$pss == null ? other$pss != null : !this$pss.equals(other$pss)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $receiver = this.getReceiver();
result = result * PRIME + ($receiver == null ? 0 : $receiver.hashCode());
final java.lang.Object $doc = this.getDoc();
result = result * PRIME + ($doc == null ? 0 : $doc.hashCode());
final java.lang.Object $docs = this.getDocs();
result = result * PRIME + ($docs == null ? 0 : $docs.hashCode());
final java.lang.Object $pss = this.getPss();
result = result * PRIME + ($pss == null ? 0 : $pss.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.SquareCall(receiver=" + this.getReceiver() + ", doc=" + this.getDoc() + ", docs=" + this.getDocs() + ", pss=" + this.getPss() + ")";
}
}
final class SquareWithCall implements Expression, HasPos, HasReceiver {
private final Position p;
private final Expression receiver;
private final With with;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "receiver", "with"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareWithCall(final Position p, final Expression receiver, final With with) {
this.p = p;
this.receiver = receiver;
this.with = with;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getReceiver() {
return this.receiver;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public With getWith() {
return this.with;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareWithCall withP(final Position p) {
return this.p == p ? this : new SquareWithCall(p, this.receiver, this.with);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareWithCall withReceiver(final Expression receiver) {
return this.receiver == receiver ? this : new SquareWithCall(this.p, receiver, this.with);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SquareWithCall withWith(final With with) {
return this.with == with ? this : new SquareWithCall(this.p, this.receiver, with);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.SquareWithCall)) return false;
final SquareWithCall other = (SquareWithCall)o;
final java.lang.Object this$receiver = this.getReceiver();
final java.lang.Object other$receiver = other.getReceiver();
if (this$receiver == null ? other$receiver != null : !this$receiver.equals(other$receiver)) return false;
final java.lang.Object this$with = this.getWith();
final java.lang.Object other$with = other.getWith();
if (this$with == null ? other$with != null : !this$with.equals(other$with)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $receiver = this.getReceiver();
result = result * PRIME + ($receiver == null ? 0 : $receiver.hashCode());
final java.lang.Object $with = this.getWith();
result = result * PRIME + ($with == null ? 0 : $with.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.SquareWithCall(receiver=" + this.getReceiver() + ", with=" + this.getWith() + ")";
}
}
final class UseSquare implements Expression {
private final Expression inner;//is either SquareCall with void receiver or With
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public UseSquare(final Expression inner) {
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.UseSquare)) return false;
final UseSquare other = (UseSquare)o;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.UseSquare(inner=" + this.getInner() + ")";
}
}
interface Catch extends HasPos {
<T> T match(Function<Catch1, T> k1, Function<CatchMany, T> kM, Function<CatchProp, T> kP);
String getX();
Expression getInner();
}
final class Catch1 implements Catch {
private final Position p;
private final SignalKind kind;
private final Type t;
private final String x;
private final Expression inner;
public <T> T match(Function<Catch1, T> k1, Function<CatchMany, T> kM, Function<CatchProp, T> kP) {
return k1.apply(this);
}
@java.beans.ConstructorProperties({"p", "kind", "t", "x", "inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Catch1(final Position p, final SignalKind kind, final Type t, final String x, final Expression inner) {
this.p = p;
this.kind = kind;
this.t = t;
this.x = x;
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SignalKind getKind() {
return this.kind;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Type getT() {
return this.t;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public String getX() {
return this.x;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Catch1 withP(final Position p) {
return this.p == p ? this : new Catch1(p, this.kind, this.t, this.x, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Catch1 withKind(final SignalKind kind) {
return this.kind == kind ? this : new Catch1(this.p, kind, this.t, this.x, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Catch1 withT(final Type t) {
return this.t == t ? this : new Catch1(this.p, this.kind, t, this.x, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Catch1 withX(final String x) {
return this.x == x ? this : new Catch1(this.p, this.kind, this.t, x, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Catch1 withInner(final Expression inner) {
return this.inner == inner ? this : new Catch1(this.p, this.kind, this.t, this.x, inner);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.Catch1)) return false;
final Catch1 other = (Catch1)o;
final java.lang.Object this$kind = this.getKind();
final java.lang.Object other$kind = other.getKind();
if (this$kind == null ? other$kind != null : !this$kind.equals(other$kind)) return false;
final java.lang.Object this$t = this.getT();
final java.lang.Object other$t = other.getT();
if (this$t == null ? other$t != null : !this$t.equals(other$t)) return false;
final java.lang.Object this$x = this.getX();
final java.lang.Object other$x = other.getX();
if (this$x == null ? other$x != null : !this$x.equals(other$x)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $kind = this.getKind();
result = result * PRIME + ($kind == null ? 0 : $kind.hashCode());
final java.lang.Object $t = this.getT();
result = result * PRIME + ($t == null ? 0 : $t.hashCode());
final java.lang.Object $x = this.getX();
result = result * PRIME + ($x == null ? 0 : $x.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.Catch1(kind=" + this.getKind() + ", t=" + this.getT() + ", x=" + this.getX() + ", inner=" + this.getInner() + ")";
}
}
final class CatchMany implements Catch {
private final Position p;
private final SignalKind kind;
private final List<Type> ts;
private final Expression inner;
public String getX() {
return "";
}
public <T> T match(Function<Catch1, T> k1, Function<CatchMany, T> kM, Function<CatchProp, T> kP) {
return kM.apply(this);
}
@java.beans.ConstructorProperties({"p", "kind", "ts", "inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchMany(final Position p, final SignalKind kind, final List<Type> ts, final Expression inner) {
this.p = p;
this.kind = kind;
this.ts = ts;
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SignalKind getKind() {
return this.kind;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<Type> getTs() {
return this.ts;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchMany withP(final Position p) {
return this.p == p ? this : new CatchMany(p, this.kind, this.ts, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchMany withKind(final SignalKind kind) {
return this.kind == kind ? this : new CatchMany(this.p, kind, this.ts, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchMany withTs(final List<Type> ts) {
return this.ts == ts ? this : new CatchMany(this.p, this.kind, ts, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchMany withInner(final Expression inner) {
return this.inner == inner ? this : new CatchMany(this.p, this.kind, this.ts, inner);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.CatchMany)) return false;
final CatchMany other = (CatchMany)o;
final java.lang.Object this$kind = this.getKind();
final java.lang.Object other$kind = other.getKind();
if (this$kind == null ? other$kind != null : !this$kind.equals(other$kind)) return false;
final java.lang.Object this$ts = this.getTs();
final java.lang.Object other$ts = other.getTs();
if (this$ts == null ? other$ts != null : !this$ts.equals(other$ts)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $kind = this.getKind();
result = result * PRIME + ($kind == null ? 0 : $kind.hashCode());
final java.lang.Object $ts = this.getTs();
result = result * PRIME + ($ts == null ? 0 : $ts.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.CatchMany(kind=" + this.getKind() + ", ts=" + this.getTs() + ", inner=" + this.getInner() + ")";
}
}
final class CatchProp implements Catch {
private final Position p;
private final SignalKind kind;
private final List<Type> ts;
private final Expression inner;
public String getX() {
return "";
}
public <T> T match(Function<Catch1, T> k1, Function<CatchMany, T> kM, Function<CatchProp, T> kP) {
return kP.apply(this);
}
@java.beans.ConstructorProperties({"p", "kind", "ts", "inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchProp(final Position p, final SignalKind kind, final List<Type> ts, final Expression inner) {
this.p = p;
this.kind = kind;
this.ts = ts;
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public SignalKind getKind() {
return this.kind;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<Type> getTs() {
return this.ts;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchProp withP(final Position p) {
return this.p == p ? this : new CatchProp(p, this.kind, this.ts, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchProp withKind(final SignalKind kind) {
return this.kind == kind ? this : new CatchProp(this.p, kind, this.ts, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchProp withTs(final List<Type> ts) {
return this.ts == ts ? this : new CatchProp(this.p, this.kind, ts, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CatchProp withInner(final Expression inner) {
return this.inner == inner ? this : new CatchProp(this.p, this.kind, this.ts, inner);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.CatchProp)) return false;
final CatchProp other = (CatchProp)o;
final java.lang.Object this$kind = this.getKind();
final java.lang.Object other$kind = other.getKind();
if (this$kind == null ? other$kind != null : !this$kind.equals(other$kind)) return false;
final java.lang.Object this$ts = this.getTs();
final java.lang.Object other$ts = other.getTs();
if (this$ts == null ? other$ts != null : !this$ts.equals(other$ts)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $kind = this.getKind();
result = result * PRIME + ($kind == null ? 0 : $kind.hashCode());
final java.lang.Object $ts = this.getTs();
result = result * PRIME + ($ts == null ? 0 : $ts.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.CatchProp(kind=" + this.getKind() + ", ts=" + this.getTs() + ", inner=" + this.getInner() + ")";
}
}
final class BlockContent {
private final List<VarDec> decs;
private final List<Catch> _catch;
@java.beans.ConstructorProperties({"decs", "_catch"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public BlockContent(final List<VarDec> decs, final List<Catch> _catch) {
this.decs = decs;
this._catch = _catch;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<VarDec> getDecs() {
return this.decs;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<Catch> get_catch() {
return this._catch;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.BlockContent)) return false;
final BlockContent other = (BlockContent)o;
final java.lang.Object this$decs = this.getDecs();
final java.lang.Object other$decs = other.getDecs();
if (this$decs == null ? other$decs != null : !this$decs.equals(other$decs)) return false;
final java.lang.Object this$_catch = this.get_catch();
final java.lang.Object other$_catch = other.get_catch();
if (this$_catch == null ? other$_catch != null : !this$_catch.equals(other$_catch)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $decs = this.getDecs();
result = result * PRIME + ($decs == null ? 0 : $decs.hashCode());
final java.lang.Object $_catch = this.get_catch();
result = result * PRIME + ($_catch == null ? 0 : $_catch.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.BlockContent(decs=" + this.getDecs() + ", _catch=" + this.get_catch() + ")";
}
}
final class RoundBlock implements Expression, HasPos {
private final Position p;
private final Doc doc;
private final Expression inner;
private final List<BlockContent> contents;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "doc", "inner", "contents"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public RoundBlock(final Position p, final Doc doc, final Expression inner, final List<BlockContent> contents) {
this.p = p;
this.doc = doc;
this.inner = inner;
this.contents = contents;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc() {
return this.doc;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<BlockContent> getContents() {
return this.contents;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.RoundBlock)) return false;
final RoundBlock other = (RoundBlock)o;
final java.lang.Object this$doc = this.getDoc();
final java.lang.Object other$doc = other.getDoc();
if (this$doc == null ? other$doc != null : !this$doc.equals(other$doc)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
final java.lang.Object this$contents = this.getContents();
final java.lang.Object other$contents = other.getContents();
if (this$contents == null ? other$contents != null : !this$contents.equals(other$contents)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $doc = this.getDoc();
result = result * PRIME + ($doc == null ? 0 : $doc.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
final java.lang.Object $contents = this.getContents();
result = result * PRIME + ($contents == null ? 0 : $contents.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.RoundBlock(doc=" + this.getDoc() + ", inner=" + this.getInner() + ", contents=" + this.getContents() + ")";
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public RoundBlock withP(final Position p) {
return this.p == p ? this : new RoundBlock(p, this.doc, this.inner, this.contents);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public RoundBlock withDoc(final Doc doc) {
return this.doc == doc ? this : new RoundBlock(this.p, doc, this.inner, this.contents);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public RoundBlock withInner(final Expression inner) {
return this.inner == inner ? this : new RoundBlock(this.p, this.doc, inner, this.contents);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public RoundBlock withContents(final List<BlockContent> contents) {
return this.contents == contents ? this : new RoundBlock(this.p, this.doc, this.inner, contents);
}
}
final class CurlyBlock implements Expression, HasPos {
private final Position p;
private final Doc doc;
private final List<BlockContent> contents;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "doc", "contents"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public CurlyBlock(final Position p, final Doc doc, final List<BlockContent> contents) {
this.p = p;
this.doc = doc;
this.contents = contents;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc() {
return this.doc;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<BlockContent> getContents() {
return this.contents;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.CurlyBlock)) return false;
final CurlyBlock other = (CurlyBlock)o;
final java.lang.Object this$doc = this.getDoc();
final java.lang.Object other$doc = other.getDoc();
if (this$doc == null ? other$doc != null : !this$doc.equals(other$doc)) return false;
final java.lang.Object this$contents = this.getContents();
final java.lang.Object other$contents = other.getContents();
if (this$contents == null ? other$contents != null : !this$contents.equals(other$contents)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $doc = this.getDoc();
result = result * PRIME + ($doc == null ? 0 : $doc.hashCode());
final java.lang.Object $contents = this.getContents();
result = result * PRIME + ($contents == null ? 0 : $contents.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.CurlyBlock(doc=" + this.getDoc() + ", contents=" + this.getContents() + ")";
}
}
final class Using implements Expression {
private final Path path;
private final String name;
private final Doc docs;
private final Parameters ps;
private final Expression inner;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"path", "name", "docs", "ps", "inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Using(final Path path, final String name, final Doc docs, final Parameters ps, final Expression inner) {
this.path = path;
this.name = name;
this.docs = docs;
this.ps = ps;
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Path getPath() {
return this.path;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public String getName() {
return this.name;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDocs() {
return this.docs;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Parameters getPs() {
return this.ps;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.Using)) return false;
final Using other = (Using)o;
final java.lang.Object this$path = this.getPath();
final java.lang.Object other$path = other.getPath();
if (this$path == null ? other$path != null : !this$path.equals(other$path)) return false;
final java.lang.Object this$name = this.getName();
final java.lang.Object other$name = other.getName();
if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
final java.lang.Object this$docs = this.getDocs();
final java.lang.Object other$docs = other.getDocs();
if (this$docs == null ? other$docs != null : !this$docs.equals(other$docs)) return false;
final java.lang.Object this$ps = this.getPs();
final java.lang.Object other$ps = other.getPs();
if (this$ps == null ? other$ps != null : !this$ps.equals(other$ps)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $path = this.getPath();
result = result * PRIME + ($path == null ? 0 : $path.hashCode());
final java.lang.Object $name = this.getName();
result = result * PRIME + ($name == null ? 0 : $name.hashCode());
final java.lang.Object $docs = this.getDocs();
result = result * PRIME + ($docs == null ? 0 : $docs.hashCode());
final java.lang.Object $ps = this.getPs();
result = result * PRIME + ($ps == null ? 0 : $ps.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.Using(path=" + this.getPath() + ", name=" + this.getName() + ", docs=" + this.getDocs() + ", ps=" + this.getPs() + ", inner=" + this.getInner() + ")";
}
}
final class ClassReuse implements Expression, Ast.Atom {
private final ClassB inner;
private final String url;
private final ExpCore.ClassB urlFetched;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"inner", "url", "urlFetched"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassReuse(final ClassB inner, final String url, final ExpCore.ClassB urlFetched) {
this.inner = inner;
this.url = url;
this.urlFetched = urlFetched;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassB getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public String getUrl() {
return this.url;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ExpCore.ClassB getUrlFetched() {
return this.urlFetched;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.ClassReuse)) return false;
final ClassReuse other = (ClassReuse)o;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
final java.lang.Object this$url = this.getUrl();
final java.lang.Object other$url = other.getUrl();
if (this$url == null ? other$url != null : !this$url.equals(other$url)) return false;
final java.lang.Object this$urlFetched = this.getUrlFetched();
final java.lang.Object other$urlFetched = other.getUrlFetched();
if (this$urlFetched == null ? other$urlFetched != null : !this$urlFetched.equals(other$urlFetched)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
final java.lang.Object $url = this.getUrl();
result = result * PRIME + ($url == null ? 0 : $url.hashCode());
final java.lang.Object $urlFetched = this.getUrlFetched();
result = result * PRIME + ($urlFetched == null ? 0 : $urlFetched.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.ClassReuse(inner=" + this.getInner() + ", url=" + this.getUrl() + ", urlFetched=" + this.getUrlFetched() + ")";
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassReuse withInner(final ClassB inner) {
return this.inner == inner ? this : new ClassReuse(inner, this.url, this.urlFetched);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassReuse withUrl(final String url) {
return this.url == url ? this : new ClassReuse(this.inner, url, this.urlFetched);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassReuse withUrlFetched(final ExpCore.ClassB urlFetched) {
return this.urlFetched == urlFetched ? this : new ClassReuse(this.inner, this.url, urlFetched);
}
}
//TODO: for decent error messages, eventually we have to admit duplicated members in Expression, so that the well formedess function can have an input
final class ClassB implements Expression, Ast.Atom, HasPos {
public ClassB(Doc doc1, Header h, List<Ast.FieldDec> fields, List<Type> supertypes, List<Member> ms, Position p) {
this.doc1 = doc1;
this.h = h;
this.fields = fields;
this.supertypes = supertypes;
this.ms = ms;
this.p = p;
isConsistent();
}
private final Doc doc1;
private final Header h;
private final List<Ast.FieldDec> fields;
private final List<Type> supertypes;
private final List<Member> ms;
private final Position p;
public boolean isConsistent() {
HashSet<String> keys = new HashSet<String>();
int countWalkBy = 0;
for (Member m : this.ms) {
if (m instanceof MethodWithType) {
MethodWithType mwt = (MethodWithType)m;
String key = mwt.getMs().toString();
//For better error messages we would like to finish parsing
//assert !keys.contains(key);
keys.add(key);
}
if (m instanceof NestedClass) {
NestedClass nc = (NestedClass)m;
String key = nc.getName().toString();
//For better error messages we would like to finish parsing
//assert !keys.contains(key);
keys.add(key);
if (nc.inner instanceof WalkBy) {
countWalkBy += 1;
}
}
}
assert countWalkBy <= 1 : this;
return true;
}
//public String toString() {
// return sugarVisitors.ToFormattedText.of(this);
//}
public interface Member extends HasPos {
<T> T match(Function<NestedClass, T> nc, Function<MethodImplemented, T> mi, Function<MethodWithType, T> mt);
}
public static final class NestedClass implements Member {
private final Doc doc;
private final Ast.C name;
private final Expression inner;
private final Ast.Position p;
public <T> T match(Function<NestedClass, T> nc, Function<MethodImplemented, T> mi, Function<MethodWithType, T> mt) {
return nc.apply(this);
}
@java.beans.ConstructorProperties({"doc", "name", "inner", "p"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public NestedClass(final Doc doc, final Ast.C name, final Expression inner, final Ast.Position p) {
this.doc = doc;
this.name = name;
this.inner = inner;
this.p = p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc() {
return this.doc;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Ast.C getName() {
return this.name;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Ast.Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public NestedClass withDoc(final Doc doc) {
return this.doc == doc ? this : new NestedClass(doc, this.name, this.inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public NestedClass withName(final Ast.C name) {
return this.name == name ? this : new NestedClass(this.doc, name, this.inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public NestedClass withInner(final Expression inner) {
return this.inner == inner ? this : new NestedClass(this.doc, this.name, inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public NestedClass withP(final Ast.Position p) {
return this.p == p ? this : new NestedClass(this.doc, this.name, this.inner, p);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.ClassB.NestedClass)) return false;
final NestedClass other = (NestedClass)o;
final java.lang.Object this$doc = this.getDoc();
final java.lang.Object other$doc = other.getDoc();
if (this$doc == null ? other$doc != null : !this$doc.equals(other$doc)) return false;
final java.lang.Object this$name = this.getName();
final java.lang.Object other$name = other.getName();
if (this$name == null ? other$name != null : !this$name.equals(other$name)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $doc = this.getDoc();
result = result * PRIME + ($doc == null ? 0 : $doc.hashCode());
final java.lang.Object $name = this.getName();
result = result * PRIME + ($name == null ? 0 : $name.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.ClassB.NestedClass(doc=" + this.getDoc() + ", name=" + this.getName() + ", inner=" + this.getInner() + ")";
}
}
public static final class MethodImplemented implements Member {
private final Doc doc;
private final MethodSelector s;
private final Expression inner;
private final Ast.Position p;
public <T> T match(Function<NestedClass, T> nc, Function<MethodImplemented, T> mi, Function<MethodWithType, T> mt) {
return mi.apply(this);
}
@java.beans.ConstructorProperties({"doc", "s", "inner", "p"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodImplemented(final Doc doc, final MethodSelector s, final Expression inner, final Ast.Position p) {
this.doc = doc;
this.s = s;
this.inner = inner;
this.p = p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc() {
return this.doc;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodSelector getS() {
return this.s;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Ast.Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodImplemented withDoc(final Doc doc) {
return this.doc == doc ? this : new MethodImplemented(doc, this.s, this.inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodImplemented withS(final MethodSelector s) {
return this.s == s ? this : new MethodImplemented(this.doc, s, this.inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodImplemented withInner(final Expression inner) {
return this.inner == inner ? this : new MethodImplemented(this.doc, this.s, inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodImplemented withP(final Ast.Position p) {
return this.p == p ? this : new MethodImplemented(this.doc, this.s, this.inner, p);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.ClassB.MethodImplemented)) return false;
final MethodImplemented other = (MethodImplemented)o;
final java.lang.Object this$doc = this.getDoc();
final java.lang.Object other$doc = other.getDoc();
if (this$doc == null ? other$doc != null : !this$doc.equals(other$doc)) return false;
final java.lang.Object this$s = this.getS();
final java.lang.Object other$s = other.getS();
if (this$s == null ? other$s != null : !this$s.equals(other$s)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $doc = this.getDoc();
result = result * PRIME + ($doc == null ? 0 : $doc.hashCode());
final java.lang.Object $s = this.getS();
result = result * PRIME + ($s == null ? 0 : $s.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.ClassB.MethodImplemented(doc=" + this.getDoc() + ", s=" + this.getS() + ", inner=" + this.getInner() + ")";
}
}
public static final class MethodWithType implements Member {
private final Doc doc;
private final MethodSelector ms;
private final MethodType mt;
private final Optional<Expression> inner;
private final Ast.Position p;
public <T> T match(Function<NestedClass, T> nc, Function<MethodImplemented, T> mi, Function<MethodWithType, T> mt) {
return mt.apply(this);
}
@java.beans.ConstructorProperties({"doc", "ms", "mt", "inner", "p"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodWithType(final Doc doc, final MethodSelector ms, final MethodType mt, final Optional<Expression> inner, final Ast.Position p) {
this.doc = doc;
this.ms = ms;
this.mt = mt;
this.inner = inner;
this.p = p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc() {
return this.doc;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodSelector getMs() {
return this.ms;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodType getMt() {
return this.mt;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Optional<Expression> getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Ast.Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodWithType withDoc(final Doc doc) {
return this.doc == doc ? this : new MethodWithType(doc, this.ms, this.mt, this.inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodWithType withMs(final MethodSelector ms) {
return this.ms == ms ? this : new MethodWithType(this.doc, ms, this.mt, this.inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodWithType withMt(final MethodType mt) {
return this.mt == mt ? this : new MethodWithType(this.doc, this.ms, mt, this.inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodWithType withInner(final Optional<Expression> inner) {
return this.inner == inner ? this : new MethodWithType(this.doc, this.ms, this.mt, inner, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public MethodWithType withP(final Ast.Position p) {
return this.p == p ? this : new MethodWithType(this.doc, this.ms, this.mt, this.inner, p);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.ClassB.MethodWithType)) return false;
final MethodWithType other = (MethodWithType)o;
final java.lang.Object this$doc = this.getDoc();
final java.lang.Object other$doc = other.getDoc();
if (this$doc == null ? other$doc != null : !this$doc.equals(other$doc)) return false;
final java.lang.Object this$ms = this.getMs();
final java.lang.Object other$ms = other.getMs();
if (this$ms == null ? other$ms != null : !this$ms.equals(other$ms)) return false;
final java.lang.Object this$mt = this.getMt();
final java.lang.Object other$mt = other.getMt();
if (this$mt == null ? other$mt != null : !this$mt.equals(other$mt)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $doc = this.getDoc();
result = result * PRIME + ($doc == null ? 0 : $doc.hashCode());
final java.lang.Object $ms = this.getMs();
result = result * PRIME + ($ms == null ? 0 : $ms.hashCode());
final java.lang.Object $mt = this.getMt();
result = result * PRIME + ($mt == null ? 0 : $mt.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.ClassB.MethodWithType(doc=" + this.getDoc() + ", ms=" + this.getMs() + ", mt=" + this.getMt() + ", inner=" + this.getInner() + ")";
}
}
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Doc getDoc1() {
return this.doc1;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Header getH() {
return this.h;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<Ast.FieldDec> getFields() {
return this.fields;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<Type> getSupertypes() {
return this.supertypes;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public List<Member> getMs() {
return this.ms;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassB withDoc1(final Doc doc1) {
return this.doc1 == doc1 ? this : new ClassB(doc1, this.h, this.fields, this.supertypes, this.ms, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassB withH(final Header h) {
return this.h == h ? this : new ClassB(this.doc1, h, this.fields, this.supertypes, this.ms, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassB withFields(final List<Ast.FieldDec> fields) {
return this.fields == fields ? this : new ClassB(this.doc1, this.h, fields, this.supertypes, this.ms, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassB withSupertypes(final List<Type> supertypes) {
return this.supertypes == supertypes ? this : new ClassB(this.doc1, this.h, this.fields, supertypes, this.ms, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassB withMs(final List<Member> ms) {
return this.ms == ms ? this : new ClassB(this.doc1, this.h, this.fields, this.supertypes, ms, this.p);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public ClassB withP(final Position p) {
return this.p == p ? this : new ClassB(this.doc1, this.h, this.fields, this.supertypes, this.ms, p);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.ClassB)) return false;
final ClassB other = (ClassB)o;
final java.lang.Object this$doc1 = this.getDoc1();
final java.lang.Object other$doc1 = other.getDoc1();
if (this$doc1 == null ? other$doc1 != null : !this$doc1.equals(other$doc1)) return false;
final java.lang.Object this$h = this.getH();
final java.lang.Object other$h = other.getH();
if (this$h == null ? other$h != null : !this$h.equals(other$h)) return false;
final java.lang.Object this$fields = this.getFields();
final java.lang.Object other$fields = other.getFields();
if (this$fields == null ? other$fields != null : !this$fields.equals(other$fields)) return false;
final java.lang.Object this$supertypes = this.getSupertypes();
final java.lang.Object other$supertypes = other.getSupertypes();
if (this$supertypes == null ? other$supertypes != null : !this$supertypes.equals(other$supertypes)) return false;
final java.lang.Object this$ms = this.getMs();
final java.lang.Object other$ms = other.getMs();
if (this$ms == null ? other$ms != null : !this$ms.equals(other$ms)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $doc1 = this.getDoc1();
result = result * PRIME + ($doc1 == null ? 0 : $doc1.hashCode());
final java.lang.Object $h = this.getH();
result = result * PRIME + ($h == null ? 0 : $h.hashCode());
final java.lang.Object $fields = this.getFields();
result = result * PRIME + ($fields == null ? 0 : $fields.hashCode());
final java.lang.Object $supertypes = this.getSupertypes();
result = result * PRIME + ($supertypes == null ? 0 : $supertypes.hashCode());
final java.lang.Object $ms = this.getMs();
result = result * PRIME + ($ms == null ? 0 : $ms.hashCode());
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.ClassB(doc1=" + this.getDoc1() + ", h=" + this.getH() + ", fields=" + this.getFields() + ", supertypes=" + this.getSupertypes() + ", ms=" + this.getMs() + ")";
}
}
final class DotDotDot implements Expression {
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public DotDotDot() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.DotDotDot)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
int result = 1;
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.DotDotDot()";
}
}
final class WalkBy implements Expression {
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public WalkBy() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.WalkBy)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
int result = 1;
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.WalkBy()";
}
}
final class EPath implements Expression, HasPos, Atom {
private final Position p;
private final Ast.Path inner;
public String toString() {
return this.getInner().toString();
}
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "inner"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public EPath(final Position p, final Ast.Path inner) {
this.p = p;
this.inner = inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Ast.Path getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public EPath withP(final Position p) {
return this.p == p ? this : new EPath(p, this.inner);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public EPath withInner(final Ast.Path inner) {
return this.inner == inner ? this : new EPath(this.p, inner);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.EPath)) return false;
final EPath other = (EPath)o;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
return result;
}
}
final class _void implements Expression, Ast.Atom {
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
public static final _void instance = new _void();
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public _void() {
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression._void)) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
int result = 1;
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression._void()";
}
}
final class Literal implements Expression, HasPos, HasReceiver {
private final Position p;
private final Expression receiver;
private final String inner;
private final boolean isNumber;
@Override
public <T> T accept(sugarVisitors.Visitor<T> v) {
return v.visit(this);
}
@java.beans.ConstructorProperties({"p", "receiver", "inner", "isNumber"})
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Literal(final Position p, final Expression receiver, final String inner, final boolean isNumber) {
this.p = p;
this.receiver = receiver;
this.inner = inner;
this.isNumber = isNumber;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Position getP() {
return this.p;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Expression getReceiver() {
return this.receiver;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public String getInner() {
return this.inner;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean isNumber() {
return this.isNumber;
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Literal withP(final Position p) {
return this.p == p ? this : new Literal(p, this.receiver, this.inner, this.isNumber);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Literal withReceiver(final Expression receiver) {
return this.receiver == receiver ? this : new Literal(this.p, receiver, this.inner, this.isNumber);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Literal withInner(final String inner) {
return this.inner == inner ? this : new Literal(this.p, this.receiver, inner, this.isNumber);
}
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public Literal withNumber(final boolean isNumber) {
return this.isNumber == isNumber ? this : new Literal(this.p, this.receiver, this.inner, isNumber);
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public boolean equals(final java.lang.Object o) {
if (o == this) return true;
if (!(o instanceof Expression.Literal)) return false;
final Literal other = (Literal)o;
final java.lang.Object this$receiver = this.getReceiver();
final java.lang.Object other$receiver = other.getReceiver();
if (this$receiver == null ? other$receiver != null : !this$receiver.equals(other$receiver)) return false;
final java.lang.Object this$inner = this.getInner();
final java.lang.Object other$inner = other.getInner();
if (this$inner == null ? other$inner != null : !this$inner.equals(other$inner)) return false;
if (this.isNumber() != other.isNumber()) return false;
return true;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public int hashCode() {
final int PRIME = 59;
int result = 1;
final java.lang.Object $receiver = this.getReceiver();
result = result * PRIME + ($receiver == null ? 0 : $receiver.hashCode());
final java.lang.Object $inner = this.getInner();
result = result * PRIME + ($inner == null ? 0 : $inner.hashCode());
result = result * PRIME + (this.isNumber() ? 79 : 97);
return result;
}
@java.lang.Override
@java.lang.SuppressWarnings("all")
@javax.annotation.Generated("lombok")
public java.lang.String toString() {
return "Expression.Literal(receiver=" + this.getReceiver() + ", inner=" + this.getInner() + ", isNumber=" + this.isNumber() + ")";
}
}
}