Use NodeVisitor::DONT_TRAVERSE_CHILDREN instead.
public const DONT_TRAVERSE_CHILDREN = NodeVisitor::DONT_TRAVERSE_CHILDREN;