org.mozilla.javascript.Node.putIntProp()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 JavaScript  
字(5.8k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.mozilla.javascript.Node.putIntProp()方法的一些代码示例,展示了Node.putIntProp()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.putIntProp()方法的具体详情如下:
包路径:org.mozilla.javascript.Node
类名称:Node
方法名:putIntProp

Node.putIntProp介绍

暂无

代码示例

代码示例来源:origin: rhino/js

/**
 * When a break is encountered annotate the statement being broken
 * out of by setting its CONTROL_BLOCK_PROP property.
 * @return logical OR of END_* flags
 */
private int endCheckBreak()
{
  Node n = ((Jump) this).jumpNode;
  n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF);
  return END_UNREACHED;
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

/**
 * When a break is encountered annotate the statement being broken
 * out of by setting its CONTROL_BLOCK_PROP property.
 * @return logical OR of END_* flags
 */
private int endCheckBreak()
{
  Node n = ((Jump) this).jumpNode;
  n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF);
  return END_UNREACHED;
}

代码示例来源:origin: rhino/js

/**
 * Regular expressions
 */
Node createRegExp(int regexpIndex)
{
  Node n = new Node(Token.REGEXP);
  n.putIntProp(Node.REGEXP_PROP, regexpIndex);
  return n;
}

代码示例来源:origin: com.github.tntim96/rhino

public void labelId(int labelId)
{
  if (type != Token.TARGET  && type != Token.YIELD) Kit.codeBug();
  putIntProp(LABEL_ID_PROP, labelId);
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

public void labelId(int labelId)
{
  if (type != Token.TARGET) Kit.codeBug();
  putIntProp(LABEL_ID_PROP, labelId);
}

代码示例来源:origin: rhino/js

public void labelId(int labelId)
{
  if (type != Token.TARGET  && type != Token.YIELD) Kit.codeBug();
  putIntProp(LABEL_ID_PROP, labelId);
}

代码示例来源:origin: io.apigee/rhino

public void labelId(int labelId)
{
  if (type != Token.TARGET  && type != Token.YIELD) Kit.codeBug();
  putIntProp(LABEL_ID_PROP, labelId);
}

代码示例来源:origin: ro.isdc.wro4j/rhino

/**
 * When a break is encountered annotate the statement being broken
 * out of by setting its CONTROL_BLOCK_PROP property.
 * @return logical OR of END_* flags
 */
private int endCheckBreak()
{
  Node n = ((Jump) this).getJumpStatement();
  n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF);
  return END_UNREACHED;
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

/**
 * Regular expressions
 */
Node createRegExp(int regexpIndex)
{
  Node n = new Node(Token.REGEXP);
  n.putIntProp(Node.REGEXP_PROP, regexpIndex);
  return n;
}

代码示例来源:origin: com.github.tntim96/rhino

/**
 * When a break is encountered annotate the statement being broken
 * out of by setting its CONTROL_BLOCK_PROP property.
 * @return logical OR of END_* flags
 */
private int endCheckBreak()
{
  Node n = ((Jump) this).getJumpStatement();
  n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF);
  return END_UNREACHED;
}

代码示例来源:origin: geogebra/geogebra

public void labelId(int labelId)
{
  if (type != Token.TARGET  && type != Token.YIELD) Kit.codeBug();
  putIntProp(LABEL_ID_PROP, labelId);
}

代码示例来源:origin: geogebra/geogebra

/**
 * When a break is encountered annotate the statement being broken
 * out of by setting its CONTROL_BLOCK_PROP property.
 * @return logical OR of END_* flags
 */
private int endCheckBreak()
{
  Node n = ((Jump) this).getJumpStatement();
  n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF);
  return END_UNREACHED;
}

代码示例来源:origin: io.apigee/rhino

/**
 * When a break is encountered annotate the statement being broken
 * out of by setting its CONTROL_BLOCK_PROP property.
 * @return logical OR of END_* flags
 */
private int endCheckBreak()
{
  Node n = ((Jump) this).getJumpStatement();
  n.putIntProp(CONTROL_BLOCK_PROP, END_DROPS_OFF);
  return END_UNREACHED;
}

代码示例来源:origin: ro.isdc.wro4j/rhino

public void labelId(int labelId)
{
  if (type != Token.TARGET  && type != Token.YIELD) Kit.codeBug();
  putIntProp(LABEL_ID_PROP, labelId);
}

代码示例来源:origin: io.apigee/rhino

private Node createIncDec(int nodeType, boolean post, Node child)
{
  child = makeReference(child);
  int childType = child.getType();
  switch (childType) {
   case Token.NAME:
   case Token.GETPROP:
   case Token.GETELEM:
   case Token.GET_REF: {
    Node n = new Node(nodeType, child);
    int incrDecrMask = 0;
    if (nodeType == Token.DEC) {
      incrDecrMask |= Node.DECR_FLAG;
    }
    if (post) {
      incrDecrMask |= Node.POST_FLAG;
    }
    n.putIntProp(Node.INCRDECR_PROP, incrDecrMask);
    return n;
   }
  }
  throw Kit.codeBug();
}

代码示例来源:origin: rhino/js

int getVarIndex(Node n)
{
  int index = n.getIntProp(Node.VARIABLE_PROP, -1);
  if (index == -1) {
    Node node;
    int type = n.getType();
    if (type == Token.GETVAR) {
      node = n;
    } else if (type == Token.SETVAR ||
          type == Token.SETCONSTVAR) {
      node = n.getFirstChild();
    } else {
      throw Kit.codeBug();
    }
    index = fnode.getIndexForNameNode(node);
    if (index < 0) throw Kit.codeBug();
    n.putIntProp(Node.VARIABLE_PROP, index);
  }
  return index;
}

代码示例来源:origin: geogebra/geogebra

public int getVarIndex(Node n)
{
  int index = n.getIntProp(Node.VARIABLE_PROP, -1);
  if (index == -1) {
    Node node;
    int type = n.getType();
    if (type == Token.GETVAR) {
      node = n;
    } else if (type == Token.SETVAR ||
          type == Token.SETCONSTVAR) {
      node = n.getFirstChild();
    } else {
      throw Kit.codeBug();
    }
    index = fnode.getIndexForNameNode(node);
    if (index < 0) throw Kit.codeBug();
    n.putIntProp(Node.VARIABLE_PROP, index);
  }
  return index;
}

代码示例来源:origin: io.apigee/rhino

public int getVarIndex(Node n)
{
  int index = n.getIntProp(Node.VARIABLE_PROP, -1);
  if (index == -1) {
    Node node;
    int type = n.getType();
    if (type == Token.GETVAR) {
      node = n;
    } else if (type == Token.SETVAR ||
          type == Token.SETCONSTVAR) {
      node = n.getFirstChild();
    } else {
      throw Kit.codeBug();
    }
    index = fnode.getIndexForNameNode(node);
    if (index < 0) throw Kit.codeBug();
    n.putIntProp(Node.VARIABLE_PROP, index);
  }
  return index;
}

代码示例来源:origin: com.github.tntim96/rhino

public int getVarIndex(Node n)
{
  int index = n.getIntProp(Node.VARIABLE_PROP, -1);
  if (index == -1) {
    Node node;
    int type = n.getType();
    if (type == Token.GETVAR) {
      node = n;
    } else if (type == Token.SETVAR ||
          type == Token.SETCONSTVAR) {
      node = n.getFirstChild();
    } else {
      throw Kit.codeBug();
    }
    index = fnode.getIndexForNameNode(node);
    if (index < 0) throw Kit.codeBug();
    n.putIntProp(Node.VARIABLE_PROP, index);
  }
  return index;
}

代码示例来源:origin: com.sun.phobos/phobos-rhino

int getVarIndex(Node n)
{
  int index = n.getIntProp(Node.VARIABLE_PROP, -1);
  if (index == -1) {
    String name;
    int type = n.getType();
    if (type == Token.GETVAR) {
      name = n.getString();
    } else if (type == Token.SETVAR ||
          type == Token.SETCONSTVAR) {
      name = n.getFirstChild().getString();
    } else {
      throw Kit.codeBug();
    }
    index = fnode.getParamOrVarIndex(name);
    if (index < 0) throw Kit.codeBug();
    n.putIntProp(Node.VARIABLE_PROP, index);
  }
  return index;
}

相关文章

微信公众号