Skip to content

Commit ed1f38c

Browse files
committed
Add toString annotations
1 parent 97bf91d commit ed1f38c

36 files changed

+114
-0
lines changed

src/main/java/com/bedrockk/molang/ast/ArrayAccessExpression.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
import com.bedrockk.molang.runtime.MoLangEnvironment;
66
import com.bedrockk.molang.runtime.MoScope;
77
import com.bedrockk.molang.runtime.value.MoValue;
8+
import lombok.EqualsAndHashCode;
9+
import lombok.ToString;
810
import lombok.Value;
911

1012
import java.util.ArrayList;
1113
import java.util.Collections;
1214

1315
@Value
16+
@ToString
17+
@EqualsAndHashCode(callSuper = true)
1418
public class ArrayAccessExpression extends StringHolder implements Expression {
1519

1620
Expression array;

src/main/java/com/bedrockk/molang/ast/AssignExpression.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@
55
import com.bedrockk.molang.runtime.MoLangEnvironment;
66
import com.bedrockk.molang.runtime.MoScope;
77
import com.bedrockk.molang.runtime.value.MoValue;
8+
import lombok.EqualsAndHashCode;
9+
import lombok.ToString;
810
import lombok.Value;
911

1012
@Value
13+
@ToString
14+
@EqualsAndHashCode(callSuper = true)
1115
public class AssignExpression extends StringHolder implements Expression {
1216

1317
Expression variable;

src/main/java/com/bedrockk/molang/ast/BinaryOpExpression.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
import com.bedrockk.molang.StringHolder;
55
import lombok.Getter;
66
import lombok.RequiredArgsConstructor;
7+
import lombok.ToString;
78

9+
@ToString
810
@Getter
911
@RequiredArgsConstructor
1012
abstract public class BinaryOpExpression extends StringHolder implements Expression {

src/main/java/com/bedrockk/molang/ast/BooleanExpression.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
import com.bedrockk.molang.runtime.MoScope;
77
import com.bedrockk.molang.runtime.value.DoubleValue;
88
import com.bedrockk.molang.runtime.value.MoValue;
9+
import lombok.EqualsAndHashCode;
10+
import lombok.ToString;
911
import lombok.Value;
1012

1113
@Value
14+
@ToString
15+
@EqualsAndHashCode(callSuper = true)
1216
public class BooleanExpression extends StringHolder implements Expression {
1317

1418
boolean value;

src/main/java/com/bedrockk/molang/ast/BooleanNotExpression.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
import com.bedrockk.molang.runtime.MoScope;
77
import com.bedrockk.molang.runtime.value.DoubleValue;
88
import com.bedrockk.molang.runtime.value.MoValue;
9+
import lombok.EqualsAndHashCode;
10+
import lombok.ToString;
911
import lombok.Value;
1012

1113
@Value
14+
@ToString
15+
@EqualsAndHashCode(callSuper = true)
1216
public class BooleanNotExpression extends StringHolder implements Expression {
1317

1418
Expression expression;

src/main/java/com/bedrockk/molang/ast/BreakExpression.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
import com.bedrockk.molang.runtime.MoScope;
77
import com.bedrockk.molang.runtime.value.DoubleValue;
88
import com.bedrockk.molang.runtime.value.MoValue;
9+
import lombok.EqualsAndHashCode;
10+
import lombok.ToString;
911
import lombok.Value;
1012

1113
@Value
14+
@ToString
15+
@EqualsAndHashCode(callSuper = true)
1216
public class BreakExpression extends StringHolder implements Expression {
1317

1418
@Override

src/main/java/com/bedrockk/molang/ast/ContinueExpression.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
import com.bedrockk.molang.runtime.MoScope;
77
import com.bedrockk.molang.runtime.value.DoubleValue;
88
import com.bedrockk.molang.runtime.value.MoValue;
9+
import lombok.EqualsAndHashCode;
10+
import lombok.ToString;
911
import lombok.Value;
1012

1113
@Value
14+
@ToString
15+
@EqualsAndHashCode(callSuper = true)
1216
public class ContinueExpression extends StringHolder implements Expression {
1317

1418
@Override

src/main/java/com/bedrockk/molang/ast/ForEachExpression.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,15 @@
77
import com.bedrockk.molang.runtime.struct.VariableStruct;
88
import com.bedrockk.molang.runtime.value.DoubleValue;
99
import com.bedrockk.molang.runtime.value.MoValue;
10+
import lombok.EqualsAndHashCode;
11+
import lombok.ToString;
1012
import lombok.Value;
1113

1214
import java.util.ArrayList;
1315

1416
@Value
17+
@ToString
18+
@EqualsAndHashCode(callSuper = true)
1519
public class ForEachExpression extends StringHolder implements Expression {
1620

1721
Expression variable;

src/main/java/com/bedrockk/molang/ast/FuncCallExpression.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import com.bedrockk.molang.runtime.MoParams;
77
import com.bedrockk.molang.runtime.MoScope;
88
import com.bedrockk.molang.runtime.value.MoValue;
9+
import lombok.EqualsAndHashCode;
10+
import lombok.ToString;
911
import lombok.Value;
1012

1113
import java.util.ArrayList;
@@ -14,6 +16,8 @@
1416
import java.util.List;
1517

1618
@Value
19+
@ToString
20+
@EqualsAndHashCode(callSuper = true)
1721
public class FuncCallExpression extends StringHolder implements Expression {
1822

1923
Expression name;

src/main/java/com/bedrockk/molang/ast/LoopExpression.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
import com.bedrockk.molang.runtime.MoScope;
77
import com.bedrockk.molang.runtime.value.DoubleValue;
88
import com.bedrockk.molang.runtime.value.MoValue;
9+
import lombok.EqualsAndHashCode;
10+
import lombok.ToString;
911
import lombok.Value;
1012

1113
@Value
14+
@ToString
15+
@EqualsAndHashCode(callSuper = true)
1216
public class LoopExpression extends StringHolder implements Expression {
1317

1418
Expression count;

0 commit comments

Comments
 (0)