accept<T> method

  1. @override
T? accept<T>(
  1. ParseTreeVisitor<T> visitor
)

The ParseTreeVisitor needs a double dispatch method. */

Implementation

@override
T? accept<T>(ParseTreeVisitor<T> visitor) {
  if (visitor is EnvVisitor<T>) {
   return visitor.visitString(this);
  } else {
  	return visitor.visitChildren(this);
  }
}