package jetbrains.mps.baseLanguage.behavior;

/*Generated by MPS */

import org.jetbrains.annotations.NotNull;
import org.jetbrains.mps.openapi.model.SNode;

public final class NextProgramPoint {
  @NotNull
  private final SNode myNode;
  private final boolean myIsAfter;
  private final boolean myWillJump;
  private NextProgramPoint(@NotNull SNode succeedingNode, boolean after, boolean willJump) {
    myNode = succeedingNode;
    myIsAfter = after;
    myWillJump = willJump;
  }
  @NotNull
  public SNode getSucceedingNode() {
    return myNode;
  }
  public boolean isAfter() {
    return myIsAfter;
  }
  public boolean willJump() {
    return myWillJump;
  }
  public static NextProgramPoint continueAfter(SNode node) {
    return new NextProgramPoint(node, true, true);
  }
  public static NextProgramPoint continueAt(SNode node, boolean willJump) {
    return new NextProgramPoint(node, false, willJump);
  }
  public NextProgramPoint withJump() {
    return new NextProgramPoint(myNode, myIsAfter, true);
  }
}
