Examples of JSFunction


Examples of com.google.gwt.dev.js.ast.JsFunction

    public void endVisit(JsExprStmt x, JsContext<JsStatement> ctx) {
      if (!(x.getExpression() instanceof JsFunction)) {
        return;
      }

      JsFunction f = (JsFunction) x.getExpression();
      JsName name = f.getName();

      if (toRemove.containsKey(name)) {
        // Removing a static initializer indicates a problem in
        // JsInliner.
        if (name.getIdent().equals("$clinit")) {
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsFunction

  protected static JsFunction isFunctionDecl(JsStatement stmt) {
    if (stmt instanceof JsExprStmt) {
      JsExprStmt exprStmt = (JsExprStmt) stmt;
      JsExpression expr = exprStmt.getExpression();
      if (expr instanceof JsFunction) {
        JsFunction func = (JsFunction) expr;
        if (func.getName() != null) {
          return func;
        }
      }
    }
    return null;
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsFunction

    public MustExecVisitor() {
    }

    @Override
    public void endVisit(JsExprStmt x, JsContext<JsStatement> ctx) {
      JsFunction func = isFunctionDecl(x);
      if (func != null) {
        mustExec.add(x);
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsFunction

    if (x == scopeStack.peek()) {
      ListIterator<JsStatement> itr = x.getStatements().listIterator();
      itrStack.push(itr);
      while (itr.hasNext()) {
        JsStatement stmt = itr.next();
        JsFunction func = JsStaticEval.isFunctionDecl(stmt);
        // Already at the top level.
        if (func != null) {
          dontMove.add(func);
        }
        accept(stmt);
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsFunction

    }

    // Rip the body out of the parsed function and attach the JavaScript
    // AST to the method.
    //
    JsFunction fn = (JsFunction) ((JsExprStmt) stmts.get(0)).getExpression();
    return fn;
  }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsFunction

            "Property providers must specify a JavaScript body", null);
        throw new UnableToCompleteException();
      }

      int lineNumber = childSchema.getStartLineNumber();
      JsFunction fn = parseJsBlock(lineNumber, script);

      property.setProvider(new PropertyProvider(fn.getBody().toSource()));
    }
View Full Code Here

Examples of com.google.gwt.dev.js.ast.JsFunction

              memberFactory.get(type).addField(member);
              membersByCorrelation.put(c, member);
              break;
            }
            case FUNCTION: {
              JsFunction function = c.getFunction();
              StandardFunctionMember member = memberFactory.get(function);
              membersByCorrelation.put(c, member);
              functionsMutable.add(member);
              break;
            }
View Full Code Here

Examples of com.google.minijoe.sys.JsFunction

  static final JsObject COMPILER_PROTOTYPE = new JsObject(OBJECT_PROTOTYPE);

  public Eval() {
    super(COMPILER_PROTOTYPE);
    scopeChain = JsSystem.createGlobal();
    addVar("eval", new JsFunction(ID_EVAL, 2));
  }
View Full Code Here

Examples of com.intellij.lang.javascript.psi.JSFunction

        if (jsClass != null)
        {
            for (String functionName : functionNames)
            {
                //Find the "mapView" function on IMediatorMap so we can find where it's used throughout the app
                JSFunction foundFunction = jsClass.findFunctionByName(functionName);

                if (foundFunction != null)
                {
                    //Find all the usages of "mapView" and return then as UsageInfo
                    List<UsageInfo2UsageAdapter> mapViewUsages = FindUsagesUtils.findUsagesOfPsiElement(foundFunction, project);
View Full Code Here

Examples of mug.runtime.JSFunction

  }
 
  @Override
  public JSObject load(JSEnvironment env) throws Exception
  {
    final JSFunction _import = new JSFunction(env) {   
      @Override
      public Object invoke(Object ths, int argc, Object l0, Object l1, Object l2, Object l3, Object l4, Object l5, Object l6, Object l7, Object[] rest) throws Exception
      {
        return importMethod(env, JSUtils.asString(l0));
      }
    };
   
    final JSFunction _Proxy = new JSFunction(env) {
      @Override
      public Object invoke(Object ths, int argc, Object l0, Object l1, Object l2, Object l3, Object l4, Object l5, Object l6, Object l7, Object[] rest) throws Exception
      {
        // coerce path
        String qn = JSUtils.asString(l0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.