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

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

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

Node.setLineno介绍

暂无

代码示例

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

  1. private Node transformFunctionCall(FunctionCall node) {
  2. Node call = createCallOrNew(Token.CALL, transform(node.getTarget()));
  3. call.setLineno(node.getLineno());
  4. decompiler.addToken(Token.LP);
  5. List<AstNode> args = node.getArguments();
  6. for (int i = 0; i < args.size(); i++) {
  7. AstNode arg = args.get(i);
  8. call.addChildToBack(transform(arg));
  9. if (i < args.size() - 1) {
  10. decompiler.addToken(Token.COMMA);
  11. }
  12. }
  13. decompiler.addToken(Token.RP);
  14. return call;
  15. }

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

  1. private Node transformFunctionCall(FunctionCall node) {
  2. Node call = createCallOrNew(Token.CALL, transform(node.getTarget()));
  3. call.setLineno(node.getLineno());
  4. decompiler.addToken(Token.LP);
  5. List<AstNode> args = node.getArguments();
  6. for (int i = 0; i < args.size(); i++) {
  7. AstNode arg = args.get(i);
  8. call.addChildToBack(transform(arg));
  9. if (i < args.size() - 1) {
  10. decompiler.addToken(Token.COMMA);
  11. }
  12. }
  13. decompiler.addToken(Token.RP);
  14. return call;
  15. }

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

  1. private Node transformFunctionCall(FunctionCall node) {
  2. Node call = createCallOrNew(Token.CALL, transform(node.getTarget()));
  3. call.setLineno(node.getLineno());
  4. decompiler.addToken(Token.LP);
  5. List<AstNode> args = node.getArguments();
  6. for (int i = 0; i < args.size(); i++) {
  7. AstNode arg = args.get(i);
  8. call.addChildToBack(transform(arg));
  9. if (i < args.size() - 1) {
  10. decompiler.addToken(Token.COMMA);
  11. }
  12. }
  13. decompiler.addToken(Token.RP);
  14. return call;
  15. }

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

  1. private Node transformFunctionCall(FunctionCall node) {
  2. Node call = createCallOrNew(Token.CALL, transform(node.getTarget()));
  3. call.setLineno(node.getLineno());
  4. decompiler.addToken(Token.LP);
  5. List<AstNode> args = node.getArguments();
  6. for (int i = 0; i < args.size(); i++) {
  7. AstNode arg = args.get(i);
  8. call.addChildToBack(transform(arg));
  9. if (i < args.size() - 1) {
  10. decompiler.addToken(Token.COMMA);
  11. }
  12. }
  13. decompiler.addToken(Token.RP);
  14. return call;
  15. }

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

  1. private Node transformNewExpr(NewExpression node) {
  2. decompiler.addToken(Token.NEW);
  3. Node nx = createCallOrNew(Token.NEW, transform(node.getTarget()));
  4. nx.setLineno(node.getLineno());
  5. List<AstNode> args = node.getArguments();
  6. decompiler.addToken(Token.LP);
  7. for (int i = 0; i < args.size(); i++) {
  8. AstNode arg = args.get(i);
  9. nx.addChildToBack(transform(arg));
  10. if (i < args.size() - 1) {
  11. decompiler.addToken(Token.COMMA);
  12. }
  13. }
  14. decompiler.addToken(Token.RP);
  15. if (node.getInitializer() != null) {
  16. nx.addChildToBack(transformObjectLiteral(node.getInitializer()));
  17. }
  18. return nx;
  19. }

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

  1. private Node transformNewExpr(NewExpression node) {
  2. decompiler.addToken(Token.NEW);
  3. Node nx = createCallOrNew(Token.NEW, transform(node.getTarget()));
  4. nx.setLineno(node.getLineno());
  5. List<AstNode> args = node.getArguments();
  6. decompiler.addToken(Token.LP);
  7. for (int i = 0; i < args.size(); i++) {
  8. AstNode arg = args.get(i);
  9. nx.addChildToBack(transform(arg));
  10. if (i < args.size() - 1) {
  11. decompiler.addToken(Token.COMMA);
  12. }
  13. }
  14. decompiler.addToken(Token.RP);
  15. if (node.getInitializer() != null) {
  16. nx.addChildToBack(transformObjectLiteral(node.getInitializer()));
  17. }
  18. return nx;
  19. }

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

  1. private Node transformNewExpr(NewExpression node) {
  2. decompiler.addToken(Token.NEW);
  3. Node nx = createCallOrNew(Token.NEW, transform(node.getTarget()));
  4. nx.setLineno(node.getLineno());
  5. List<AstNode> args = node.getArguments();
  6. decompiler.addToken(Token.LP);
  7. for (int i = 0; i < args.size(); i++) {
  8. AstNode arg = args.get(i);
  9. nx.addChildToBack(transform(arg));
  10. if (i < args.size() - 1) {
  11. decompiler.addToken(Token.COMMA);
  12. }
  13. }
  14. decompiler.addToken(Token.RP);
  15. if (node.getInitializer() != null) {
  16. nx.addChildToBack(transformObjectLiteral(node.getInitializer()));
  17. }
  18. return nx;
  19. }

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

  1. private Node transformNewExpr(NewExpression node) {
  2. decompiler.addToken(Token.NEW);
  3. Node nx = createCallOrNew(Token.NEW, transform(node.getTarget()));
  4. nx.setLineno(node.getLineno());
  5. List<AstNode> args = node.getArguments();
  6. decompiler.addToken(Token.LP);
  7. for (int i = 0; i < args.size(); i++) {
  8. AstNode arg = args.get(i);
  9. nx.addChildToBack(transform(arg));
  10. if (i < args.size() - 1) {
  11. decompiler.addToken(Token.COMMA);
  12. }
  13. }
  14. decompiler.addToken(Token.RP);
  15. if (node.getInitializer() != null) {
  16. nx.addChildToBack(transformObjectLiteral(node.getInitializer()));
  17. }
  18. return nx;
  19. }

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

  1. throw codeBug();
  2. rightElem.setLineno(lineno);
  3. AstNode value = prop.getRight();
  4. if (value.getType() == Token.NAME) {

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

  1. throw codeBug();
  2. rightElem.setLineno(lineno);
  3. AstNode value = prop.getRight();
  4. if (value.getType() == Token.NAME) {

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

  1. throw codeBug();
  2. rightElem.setLineno(lineno);
  3. AstNode value = prop.getRight();
  4. if (value.getType() == Token.NAME) {

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

  1. throw codeBug();
  2. rightElem.setLineno(lineno);
  3. AstNode value = prop.getRight();
  4. if (value.getType() == Token.NAME) {

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

  1. call.setLineno(node.getLineno());
  2. decompiler.addToken(Token.LP);
  3. decompiler.addToken(Token.RP);

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

  1. call.setLineno(node.getLineno());
  2. decompiler.addToken(Token.LP);
  3. decompiler.addToken(Token.RP);

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

  1. call.setLineno(node.getLineno());
  2. decompiler.addToken(Token.LP);
  3. decompiler.addToken(Token.RP);

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

  1. call.setLineno(node.getLineno());
  2. decompiler.addToken(Token.LP);
  3. decompiler.addToken(Token.RP);

相关文章