v4: Specify @Override

[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9376]
This commit is contained in:
sharwell 2011-11-17 19:06:20 -08:00
parent 5f6b463174
commit b441dc226a
1 changed files with 4 additions and 0 deletions

View File

@ -103,19 +103,23 @@ public class TreeFilter<T> extends TreeParser {
public void downup(T t) { public void downup(T t) {
TreeVisitor v = new TreeVisitor(new CommonASTAdaptor()); TreeVisitor v = new TreeVisitor(new CommonASTAdaptor());
TreeVisitorAction actions = new TreeVisitorAction<T>() { TreeVisitorAction actions = new TreeVisitorAction<T>() {
@Override
public T pre(T t) { applyOnce(t, topdown_fptr); return t; } public T pre(T t) { applyOnce(t, topdown_fptr); return t; }
@Override
public T post(T t) { applyOnce(t, bottomup_fptr); return t; } public T post(T t) { applyOnce(t, bottomup_fptr); return t; }
}; };
v.visit(t, actions); v.visit(t, actions);
} }
fptr topdown_fptr = new fptr() { fptr topdown_fptr = new fptr() {
@Override
public void rule() throws RecognitionException { public void rule() throws RecognitionException {
topdown(); topdown();
} }
}; };
fptr bottomup_fptr = new fptr() { fptr bottomup_fptr = new fptr() {
@Override
public void rule() throws RecognitionException { public void rule() throws RecognitionException {
bottomup(); bottomup();
} }