diff --git a/src/main/java/de/maishai/ast/UnaryOperator.java b/src/main/java/de/maishai/ast/UnaryOperator.java new file mode 100644 index 0000000..cfa42dd --- /dev/null +++ b/src/main/java/de/maishai/ast/UnaryOperator.java @@ -0,0 +1,6 @@ +package de.maishai.ast; + +public enum UnaryOperator { + SUB, + NOT +} diff --git a/src/main/java/de/maishai/ast/records/Unary.java b/src/main/java/de/maishai/ast/records/Unary.java new file mode 100644 index 0000000..aa1300f --- /dev/null +++ b/src/main/java/de/maishai/ast/records/Unary.java @@ -0,0 +1,7 @@ +package de.maishai.ast.records; + + +import de.maishai.ast.UnaryOperator; + +public record Unary(UnaryOperator op, Expression right) implements Expression { +}