package jetbrains.mps.baseLanguage.generator.java.references.util;

/*Generated by MPS */

import org.jetbrains.mps.openapi.model.SNode;
import jetbrains.mps.generator.template.TemplateQueryContext;
import java.util.Objects;

public class LocalDeclarationToReferenceMarker {

  private static String key(SNode lvd) {
    return "LOCAL_REF" + lvd.getNodeId();
  }

  public static void mark(TemplateQueryContext gc, SNode lvd) {
    gc.putSessionObject(key(lvd), true);
  }
  public static void unmark(TemplateQueryContext gc, SNode lvd) {
    gc.putSessionObject(key(lvd), false);
  }
  public static boolean isMarked(TemplateQueryContext gc, SNode lvd) {
    return Objects.equals(gc.getSessionObject(key(lvd)), true);
  }
}
