rewrote SymbolResolver with visitor pattern