aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/compiler/ast/ASTList.java
diff options
context:
space:
mode:
authorShigeru Chiba <chibash@users.noreply.github.com>2024-05-03 19:01:47 +0900
committerGitHub <noreply@github.com>2024-05-03 19:01:47 +0900
commitbb261b443831e52409eeed6e49ddfb24db2c4d08 (patch)
tree3f8189ef73984d71ad0b8fe595c0e3a2a425e6bb /src/main/javassist/compiler/ast/ASTList.java
parent204d67844433c9b781054154695eeb14c2291847 (diff)
parent9777bae93cc84249fe08a7e81b2101c415bd55e5 (diff)
downloadjavassist-bb261b443831e52409eeed6e49ddfb24db2c4d08.tar.gz
javassist-bb261b443831e52409eeed6e49ddfb24db2c4d08.zip
Merge pull request #484 from kuznet1/master
Line numbers support
Diffstat (limited to 'src/main/javassist/compiler/ast/ASTList.java')
-rw-r--r--src/main/javassist/compiler/ast/ASTList.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/javassist/compiler/ast/ASTList.java b/src/main/javassist/compiler/ast/ASTList.java
index d9232ca0..786957f5 100644
--- a/src/main/javassist/compiler/ast/ASTList.java
+++ b/src/main/javassist/compiler/ast/ASTList.java
@@ -28,18 +28,18 @@ public class ASTList extends ASTree {
private ASTree left;
private ASTList right;
- public ASTList(ASTree _head, ASTList _tail) {
+ public ASTList(ASTree _head, ASTList _tail, int lineNumber) {
+ super(lineNumber);
left = _head;
right = _tail;
}
- public ASTList(ASTree _head) {
- left = _head;
- right = null;
+ public ASTList(ASTree _head, int lineNumber) {
+ this(_head, null, lineNumber);
}
- public static ASTList make(ASTree e1, ASTree e2, ASTree e3) {
- return new ASTList(e1, new ASTList(e2, new ASTList(e3)));
+ public static ASTList make(ASTree e1, ASTree e2, ASTree e3 , int lineNumber) {
+ return new ASTList(e1, new ASTList(e2, new ASTList(e3, lineNumber), lineNumber), lineNumber);
}
@Override
@@ -146,8 +146,8 @@ public class ASTList extends ASTree {
/**
* Appends an object to a list.
*/
- public static ASTList append(ASTList a, ASTree b) {
- return concat(a, new ASTList(b));
+ public static ASTList append(ASTList a, ASTree b, int lineNumber) {
+ return concat(a, new ASTList(b, lineNumber));
}
/**