Skip to content

Commit aedab8c

Browse files
committed
Removed placeholder Undefined Var error detection
1 parent ff6dbb7 commit aedab8c

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

‎MiniJavaCompiler.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public static void main(String[] args)
4848
System.out.println("Oh no... the scope is null!");
4949
else
5050
s.print(0);
51+
5152
}
5253
}
5354
}

‎visitor/BuildSymbolTableVisitor.java‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,6 @@ private void redefError(String name, int line, int character)
6767
errorDetected = true;
6868
}
6969

70-
//Helper function to report Undefined Errors
71-
private void undefError(String name, int line, int character)
72-
{
73-
System.err.println("Use of undefined identifier " + name + " at line " + line + ", character " + character);
74-
errorDetected = true;
75-
}
76-
7770
// MainClass m;
7871
// ClassDeclList cl;
7972
public void visit(Program n)
@@ -397,8 +390,7 @@ public void visit(False n)
397390

398391
// String s;
399392
public void visit(IdentifierExp n)
400-
{
401-
}
393+
{}
402394

403395
public void visit(This n)
404396
{}

0 commit comments

Comments
 (0)