Provide default implementation of accept method

With the default implementation, the AST traversal is more thorough, and the code is shorter.