added SemanticVisitor interface to support visitor who throws SemanticError exception