All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.joern.fuzzyc2cpg.ast.statements.IdentifierDeclStatement Maven / Gradle / Ivy

There is a newer version: 1.1.911
Show newest version
package io.joern.fuzzyc2cpg.ast.statements;

import io.joern.fuzzyc2cpg.ast.AstNode;
import io.joern.fuzzyc2cpg.ast.declarations.IdentifierDeclType;
import io.joern.fuzzyc2cpg.ast.logical.statements.Statement;
import io.joern.fuzzyc2cpg.ast.walking.ASTNodeVisitor;
import java.util.List;

public class IdentifierDeclStatement extends Statement {

  private IdentifierDeclType type = new IdentifierDeclType();

  public void addChild(AstNode node) {
    if (node instanceof IdentifierDeclType) {
      setType((IdentifierDeclType) node);
      return; // Do NOT add type to children.
    }
    super.addChild(node);
  }

  public IdentifierDeclType getType() {
    return type;
  }

  private void setType(IdentifierDeclType node) {
    type = node;
  }

  public List getIdentifierDeclList() {
    return children;
  }

  public void accept(ASTNodeVisitor visitor) {
    visitor.visit(this);
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy