diff options
author | akuznetsov <akuznetsov@tradingview.com> | 2023-09-26 15:57:53 +0400 |
---|---|---|
committer | akuznetsov <akuznetsov@tradingview.com> | 2023-10-04 14:06:05 +0400 |
commit | d5a7881381080fa4953b24c069675ca435598b95 (patch) | |
tree | 7a94b14981dde07f72068b1bb0704e7b4c2f3fc8 /src/main/javassist/compiler/ast/ASTList.java | |
parent | 700be6f6f9546e8af049b1a763ce27f1fde5955d (diff) | |
download | javassist-d5a7881381080fa4953b24c069675ca435598b95.tar.gz javassist-d5a7881381080fa4953b24c069675ca435598b95.zip |
add line numbers and test
Diffstat (limited to 'src/main/javassist/compiler/ast/ASTList.java')
-rw-r--r-- | src/main/javassist/compiler/ast/ASTList.java | 16 |
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)); } /** |