/* Generated by JTB 1.5.1 */
package grammars.a.sgvis;

import grammars.a.Token;
import grammars.a.sgtree.*;

@SuppressWarnings("javadoc")
public class DepthFirstVoidVisitor implements IVoidVisitor {

  int depthLevel = 0;

  @Override
  public void visit(final NodeChoice n) {
    ++depthLevel;
    n.choice.accept(this);
    --depthLevel;
    return;
  }

  @Override
  public void visit(final NodeList n) {
    for (INode e : n.nodes) {
      ++depthLevel;
      e.accept(this);
      --depthLevel;
    }
    return;
  }

  @Override
  public void visit(final NodeListOptional n) {
    if (n.present()) {
      for (INode e : n.nodes) {
        ++depthLevel;
        e.accept(this);
        --depthLevel;
      }
      return;
    }
    return;
  }

  @Override
  public void visit(final NodeOptional n) {
    if (n.present()) {
      ++depthLevel;
      n.node.accept(this);
      --depthLevel;
      return;
    }
    return;
  }

  @Override
  public void visit(final NodeSequence n) {
    for (INode e : n.nodes) {
      ++depthLevel;
      e.accept(this);
      --depthLevel;
    }
    return;
  }

  @Override
  public void visit(final Token n) {
    @SuppressWarnings("unused")
    final String tkIm = n.image;
    return;
  }

  @Override
  public void visit(final ASTclassDeclaration123 n) {
    ++depthLevel;
    n.token.accept(this);
    --depthLevel;
    ++depthLevel;
    n.className.accept(this);
    --depthLevel;
    ++depthLevel;
    n.token1.accept(this);
    --depthLevel;
    ++depthLevel;
    n.nodeListOptional.accept(this);
    --depthLevel;
    ++depthLevel;
    n.token2.accept(this);
    --depthLevel;
    ++depthLevel;
    n.token3.accept(this);
    --depthLevel;
    ++depthLevel;
    n.jc_0.accept(this);
    --depthLevel;
    ++depthLevel;
    n.token4.accept(this);
    --depthLevel;
  }

  @Override
  public void visit(final ASTclassName123 n) {
    ++depthLevel;
    n.token.accept(this);
    --depthLevel;
  }

  @Override
  public void visit(final ASTmethod123 n) {
    ++depthLevel;
    n.methodName.accept(this);
    --depthLevel;
    ++depthLevel;
    n.token.accept(this);
    --depthLevel;
    ++depthLevel;
    n.nodeList.accept(this);
    --depthLevel;
    ++depthLevel;
    n.token1.accept(this);
    --depthLevel;
  }

  @Override
  public void visit(final ASTmethodName123 n) {
    ++depthLevel;
    n.token.accept(this);
    --depthLevel;
  }

  @Override
  public void visit(final ASTinstruction123 n) {
    ++depthLevel;
    n.nodeChoice.accept(this);
    --depthLevel;
  }

  @Override
  public void visit(final ASTbp_jual123 n) {
    ++depthLevel;
    n.token.accept(this);
    --depthLevel;
  }

  @Override
  public void visit(final ASTbp_hm123 n) {
    ++depthLevel;
    n.token.accept(this);
    --depthLevel;
  }

  @SuppressWarnings("unused")
  @Override
  public void visit(final ASTjc_0123 n) {
    /* empty node, nothing that can be generated so far */
  }

}
