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

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

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

Node.addChildToBack介绍

暂无

代码示例

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

/**
 * Add a child to the back of the given node.  This function
 * breaks the Factory abstraction, but it removes a requirement
 * from implementors of Node.
 */
void addChildToBack(Node parent, Node child)
{
  parent.addChildToBack(child);
}

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

/**
 * Add a child to the back of the given node.  This function
 * breaks the Factory abstraction, but it removes a requirement
 * from implementors of Node.
 */
void addChildToBack(Node parent, Node child)
{
  parent.addChildToBack(child);
}

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

private Node createName(int type, String name, Node child)
{
  Node result = createName(name);
  result.setType(type);
  if (child != null)
    result.addChildToBack(child);
  return result;
}

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

protected Node createName(int type, String name, Node child) {
  Node result = createName(name);
  result.setType(type);
  if (child != null)
    result.addChildToBack(child);
  return result;
}

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

protected Node createName(int type, String name, Node child) {
  Node result = createName(name);
  result.setType(type);
  if (child != null)
    result.addChildToBack(child);
  return result;
}

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

protected Node createName(int type, String name, Node child) {
  Node result = createName(name);
  result.setType(type);
  if (child != null)
    result.addChildToBack(child);
  return result;
}

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

protected Node createName(int type, String name, Node child) {
  Node result = createName(name);
  result.setType(type);
  if (child != null)
    result.addChildToBack(child);
  return result;
}

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

private Node createWith(Node obj, Node body, int lineno) {
  setRequiresActivation();
  Node result = new Node(Token.BLOCK, lineno);
  result.addChildToBack(new Node(Token.ENTERWITH, obj));
  Node bodyNode = new Node(Token.WITH, body, lineno);
  result.addChildrenToBack(bodyNode);
  result.addChildToBack(new Node(Token.LEAVEWITH));
  return result;
}

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

private Node createWith(Node obj, Node body, int lineno) {
  setRequiresActivation();
  Node result = new Node(Token.BLOCK, lineno);
  result.addChildToBack(new Node(Token.ENTERWITH, obj));
  Node bodyNode = new Node(Token.WITH, body, lineno);
  result.addChildrenToBack(bodyNode);
  result.addChildToBack(new Node(Token.LEAVEWITH));
  return result;
}

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

/**
 * With
 */
Node createWith(Node obj, Node body, int lineno)
{
  setRequiresActivation();
  Node result = new Node(Token.BLOCK, lineno);
  result.addChildToBack(new Node(Token.ENTERWITH, obj));
  Node bodyNode = new Node(Token.WITH, body, lineno);
  result.addChildrenToBack(bodyNode);
  result.addChildToBack(new Node(Token.LEAVEWITH));
  return result;
}

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

private Node createWith(Node obj, Node body, int lineno) {
  setRequiresActivation();
  Node result = new Node(Token.BLOCK, lineno);
  result.addChildToBack(new Node(Token.ENTERWITH, obj));
  Node bodyNode = new Node(Token.WITH, body, lineno);
  result.addChildrenToBack(bodyNode);
  result.addChildToBack(new Node(Token.LEAVEWITH));
  return result;
}

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

private Node createWith(Node obj, Node body, int lineno) {
  setRequiresActivation();
  Node result = new Node(Token.BLOCK, lineno);
  result.addChildToBack(new Node(Token.ENTERWITH, obj));
  Node bodyNode = new Node(Token.WITH, body, lineno);
  result.addChildrenToBack(bodyNode);
  result.addChildToBack(new Node(Token.LEAVEWITH));
  return result;
}

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

/**
 * With
 */
Node createWith(Node obj, Node body, int lineno)
{
  setRequiresActivation();
  Node result = new Node(Token.BLOCK, lineno);
  result.addChildToBack(new Node(Token.ENTERWITH, obj));
  Node bodyNode = new Node(Token.WITH, body, lineno);
  result.addChildrenToBack(bodyNode);
  result.addChildToBack(new Node(Token.LEAVEWITH));
  return result;
}

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

private Node transformFunctionCall(FunctionCall node) {
  Node call = createCallOrNew(Token.CALL, transform(node.getTarget()));
  call.setLineno(node.getLineno());
  decompiler.addToken(Token.LP);
  List<AstNode> args = node.getArguments();
  for (int i = 0; i < args.size(); i++) {
    AstNode arg = args.get(i);
    call.addChildToBack(transform(arg));
    if (i < args.size() - 1) {
      decompiler.addToken(Token.COMMA);
    }
  }
  decompiler.addToken(Token.RP);
  return call;
}

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

private Node transformFunctionCall(FunctionCall node) {
  Node call = createCallOrNew(Token.CALL, transform(node.getTarget()));
  call.setLineno(node.getLineno());
  decompiler.addToken(Token.LP);
  List<AstNode> args = node.getArguments();
  for (int i = 0; i < args.size(); i++) {
    AstNode arg = args.get(i);
    call.addChildToBack(transform(arg));
    if (i < args.size() - 1) {
      decompiler.addToken(Token.COMMA);
    }
  }
  decompiler.addToken(Token.RP);
  return call;
}

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

private Node transformFunctionCall(FunctionCall node) {
  Node call = createCallOrNew(Token.CALL, transform(node.getTarget()));
  call.setLineno(node.getLineno());
  decompiler.addToken(Token.LP);
  List<AstNode> args = node.getArguments();
  for (int i = 0; i < args.size(); i++) {
    AstNode arg = args.get(i);
    call.addChildToBack(transform(arg));
    if (i < args.size() - 1) {
      decompiler.addToken(Token.COMMA);
    }
  }
  decompiler.addToken(Token.RP);
  return call;
}

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

private Node transformScript(ScriptNode node) {
  decompiler.addToken(Token.SCRIPT);
  if (currentScope != null) Kit.codeBug();
  currentScope = node;
  Node body = new Node(Token.BLOCK);
  for (Node kid : node) {
    body.addChildToBack(transform((AstNode)kid));
  }
  node.removeChildren();
  Node children = body.getFirstChild();
  if (children != null) {
    node.addChildrenToBack(children);
  }
  return node;
}

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

private Node transformScript(ScriptNode node) {
  decompiler.addToken(Token.SCRIPT);
  if (currentScope != null) Kit.codeBug();
  currentScope = node;
  Node body = new Node(Token.BLOCK);
  for (Node kid : node) {
    body.addChildToBack(transform((AstNode)kid));
  }
  node.removeChildren();
  Node children = body.getFirstChild();
  if (children != null) {
    node.addChildrenToBack(children);
  }
  return node;
}

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

private Node transformScript(ScriptNode node) {
  decompiler.addToken(Token.SCRIPT);
  if (currentScope != null) Kit.codeBug();
  currentScope = node;
  Node body = new Node(Token.BLOCK);
  for (Node kid : node) {
    body.addChildToBack(transform((AstNode)kid));
  }
  node.removeChildren();
  Node children = body.getFirstChild();
  if (children != null) {
    node.addChildrenToBack(children);
  }
  return node;
}

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

private Node transformScript(ScriptNode node) {
  decompiler.addToken(Token.SCRIPT);
  if (currentScope != null) Kit.codeBug();
  currentScope = node;
  Node body = new Node(Token.BLOCK);
  for (Node kid : node) {
    body.addChildToBack(transform((AstNode)kid));
  }
  node.removeChildren();
  Node children = body.getFirstChild();
  if (children != null) {
    node.addChildrenToBack(children);
  }
  return node;
}

相关文章

微信公众号