Package org.mozilla.javascript.ast

Examples of org.mozilla.javascript.ast.VariableInitializer


  @Override
  public AstNode variableDeclaration(boolean statement, Iterable<NameValue<AstNode>> vars) {
    VariableDeclaration varDecl = new VariableDeclaration();
    varDecl.setIsStatement(statement);
    for (NameValue<AstNode> v : vars) {
      VariableInitializer var = new VariableInitializer();
      var.setTarget(name(v.getName()));
      var.setInitializer(v.getValue());
      varDecl.addVariable(var);
    }
    return varDecl;
  }
View Full Code Here


  @Override
  public AstNode variableDeclaration(boolean statement, CharSequence name, AstNode init) {
    VariableDeclaration vars = new VariableDeclaration();
    vars.setIsStatement(statement);
    VariableInitializer var = new VariableInitializer();
    var.setTarget(name(name));
    var.setInitializer(init);
    vars.addVariable(var);
    return vars;
  }
View Full Code Here

TOP

Related Classes of org.mozilla.javascript.ast.VariableInitializer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.