diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2005-08-17 16:07:45 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2005-08-17 16:07:45 +0000 |
commit | f6faf5fde703853cfe3ea27a46db4b8523746d0d (patch) | |
tree | 4da71a834733c02f4600792abf823e9aad5a4c35 /src/main/javassist/compiler/Javac.java | |
parent | 6dc6b9945eb0d3b49113d6c512d35ed1a16dd870 (diff) | |
download | javassist-f6faf5fde703853cfe3ea27a46db4b8523746d0d.tar.gz javassist-f6faf5fde703853cfe3ea27a46db4b8523746d0d.zip |
fixed a compilation problem of static final fields.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@192 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/compiler/Javac.java')
-rw-r--r-- | src/main/javassist/compiler/Javac.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/main/javassist/compiler/Javac.java b/src/main/javassist/compiler/Javac.java index 88ed0ab5..7a9dbe83 100644 --- a/src/main/javassist/compiler/Javac.java +++ b/src/main/javassist/compiler/Javac.java @@ -569,12 +569,21 @@ public class Javac { * have been invoked. */ public void compileExpr(String src) throws CompileError { - Parser p = new Parser(new Lex(src)); - ASTree e = p.parseExpression(stable); + ASTree e = parseExpr(src, stable); compileExpr(e); } /** + * Parsers an expression. + */ + public static ASTree parseExpr(String src, SymbolTable st) + throws CompileError + { + Parser p = new Parser(new Lex(src)); + return p.parseExpression(st); + } + + /** * Compiles an exression. <code>recordParams()</code> must be * called before invoking this method. * @@ -585,6 +594,6 @@ public class Javac { */ public void compileExpr(ASTree e) throws CompileError { if (e != null) - e.accept(gen); + gen.compileExpr(e); } } |