add base class to create a visitor for AST