Package org.lilystudio.javascript.scope

Examples of org.lilystudio.javascript.scope.GlobalScope


      int mode) throws Exception {
    Parser parser = new Parser(new CompilerEnvirons(), reporter);
    ScriptOrFnNode root = parser.parse(reader, null, 1);

    Environment env = new Environment(keepLineno, mode);
    GlobalScope globalScope = new GlobalScope();
    StatementList statements = new StatementList();
    Node node = root.getFirstChild();
    while (node != null) {
      IStatement statement = Utils.createStatement(node, root, globalScope);
      statements.add(statement);
      node = statement.getNext();
    }
    if (statements.size() > 0) {
      globalScope.compress(statements.get(0) instanceof VariableStatement, env);
    }

    if (env.isKeepLineno()) {
      env.setLineno(1);
    }
View Full Code Here

TOP

Related Classes of org.lilystudio.javascript.scope.GlobalScope

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.