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

io.joern.fuzzyc2cpg.ast.statements.jump.GotoStatement Maven / Gradle / Ivy

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

import io.joern.fuzzyc2cpg.ast.logical.statements.JumpStatement;
import io.joern.fuzzyc2cpg.ast.walking.ASTNodeVisitor;

public class GotoStatement extends JumpStatement {

  public String getTargetName() {
    // TODO since C world does not use the setTargetLabel() method but
    // instead uses addChild(), we have to use getChild(0) here
    // instead of getTargetLabel()
    return getChild(0).getEscapedCodeStr();
  }

  public String getEscapedCodeStr() {
    return "goto " + getTargetName() + ";";
  }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy