com.xlrit.gears.base.snel.Expression Maven / Gradle / Ivy
package com.xlrit.gears.base.snel;
import lombok.Data;
// NOTE not used atm
public interface Expression {
@Data
class UnaryExpression implements Expression {
private final String operator;
private final Expression operand;
}
@Data
class BinaryExpression implements Expression {
private final String operator;
private final Expression left;
private final Expression right;
}
@Data
class MemberExpression implements Expression {
private final Expression parent;
private final String memberName;
}
@Data
class Identifier implements Expression {
private final String name;
}
interface Literal extends Expression {}
@Data
class IntegerLiteral implements Literal {
private long value;
}
@Data
class StringLiteral implements Literal {
private long value;
}
}