diff --git a/ChangeLog b/ChangeLog index 3fcd5d9..f55b94a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Mon Feb 18 02:30:44 2008 Minero Aoki + + * net/loveruby/cflat/compiler/DereferenceChecker.java: add blanks. + Tue Feb 12 06:49:39 2008 Minero Aoki * net/loveruby/cflat/compiler/TypeResolver.java: should check diff --git a/net/loveruby/cflat/compiler/DereferenceChecker.java b/net/loveruby/cflat/compiler/DereferenceChecker.java index 2f3c72e..1ab6c59 100644 --- a/net/loveruby/cflat/compiler/DereferenceChecker.java +++ b/net/loveruby/cflat/compiler/DereferenceChecker.java @@ -26,11 +26,13 @@ class DereferenceChecker extends Visitor { DefinedVariable var = (DefinedVariable)vars.next(); checkVariable(var); } + Iterator funcs = ast.functions(); while (funcs.hasNext()) { DefinedFunction f = (DefinedFunction)funcs.next(); check(f.body()); } + if (errorHandler.errorOccured()) { throw new SemanticException("compile failed."); } @@ -46,11 +48,12 @@ class DereferenceChecker extends Visitor { DefinedVariable var = (DefinedVariable)vars.next(); checkVariable(var); } + Iterator stmts = node.stmts(); while (stmts.hasNext()) { + Node stmt = (Node)stmts.next(); try { - Node n = (Node)stmts.next(); - check(n); + check(stmt); } catch (SemanticError err) { ;