Add AST visitor to convert to NFA.