ASTVisitor { enter, leave ) functions are not exported. Is there any specific reason to keep these function name in lowercase
Hello, I'm implementing custom QueryVisitor struct by embedding DefaultASTVisitor and overridde enter and leave functions to create stack that contains query element as they are visited. Idea is when query is visited by passing QueryVisitor instance, it will invoke my enter and leave function. However, it is not working expected if QueryVisitor is defined in seperate package outside of parser package.
package client QueryVisitor{ DefaultASTVisitor }
Is there any reason to keep enter and leave function name unexported ? Due to this issue, I had to define QueryVisitor in the same package as DefaultASTVisitor to make it work. Can this be fixed ?
@dmankotia No special reason and makes sense to export them.