From cdca9771599b4c3337aaf42cf7460a27dc1719d5 Mon Sep 17 00:00:00 2001 From: chiba Date: Thu, 27 Nov 2003 05:33:16 +0000 Subject: I implemented a type checker for better code generation. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@55 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/compiler/ast/CondExpr.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main/javassist/compiler/ast/CondExpr.java') diff --git a/src/main/javassist/compiler/ast/CondExpr.java b/src/main/javassist/compiler/ast/CondExpr.java index 9cb821a5..9cfde8ad 100644 --- a/src/main/javassist/compiler/ast/CondExpr.java +++ b/src/main/javassist/compiler/ast/CondExpr.java @@ -29,8 +29,12 @@ public class CondExpr extends ASTList { public ASTree thenExpr() { return tail().head(); } + public void setThen(ASTree t) { tail().setHead(t); } + public ASTree elseExpr() { return tail().tail().head(); } + public void setElse(ASTree t) { tail().tail().setHead(t); } + public String getTag() { return "?:"; } public void accept(Visitor v) throws CompileError { v.atCondExpr(this); } -- cgit v1.2.3