From d5a7881381080fa4953b24c069675ca435598b95 Mon Sep 17 00:00:00 2001 From: akuznetsov Date: Tue, 26 Sep 2023 15:57:53 +0400 Subject: add line numbers and test --- src/main/javassist/compiler/ast/Expr.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main/javassist/compiler/ast/Expr.java') diff --git a/src/main/javassist/compiler/ast/Expr.java b/src/main/javassist/compiler/ast/Expr.java index ed5cb60b..4d2ce1a0 100644 --- a/src/main/javassist/compiler/ast/Expr.java +++ b/src/main/javassist/compiler/ast/Expr.java @@ -33,22 +33,22 @@ public class Expr extends ASTList implements TokenId { private static final long serialVersionUID = 1L; protected int operatorId; - Expr(int op, ASTree _head, ASTList _tail) { - super(_head, _tail); + Expr(int op, ASTree _head, ASTList _tail, int lineNumber) { + super(_head, _tail, lineNumber); operatorId = op; } - Expr(int op, ASTree _head) { - super(_head); + Expr(int op, ASTree _head, int lineNumber) { + super(_head, lineNumber); operatorId = op; } - public static Expr make(int op, ASTree oprand1, ASTree oprand2) { - return new Expr(op, oprand1, new ASTList(oprand2)); + public static Expr make(int op, ASTree oprand1, ASTree oprand2, int lineNumber) { + return new Expr(op, oprand1, new ASTList(oprand2, lineNumber), lineNumber); } - public static Expr make(int op, ASTree oprand1) { - return new Expr(op, oprand1); + public static Expr make(int op, ASTree oprand1, int lineNumber) { + return new Expr(op, oprand1, lineNumber); } public int getOperator() { return operatorId; } -- cgit v1.2.3