Package org.zkoss.zuss.metainfo

Examples of org.zkoss.zuss.metainfo.FunctionDefinition


            nextAndCheck(ctx, ';', true);

            final Method mtd = Classes.getMethod(
              ((Other)t0).getValue(), name, adefs.length,
              getFilename(), t0.getLine());
            new FunctionDefinition(
              ctx.block.owner, name, adefs, mtd, lineno);
            return;
          } else {
            putback(t1);
            final Expression expr = new Expression(t0.getLine());
              //note: expr is NOT a child of any node but part of VariableDefinition below
            parseExpression(ctx, expr, ';');
            new FunctionDefinition(
              ctx.block.owner, name, adefs, expr, lineno);
            return;
          }
        } else if (symbol == '{') { //mixin
          newBlock(ctx, new MixinDefinition(
View Full Code Here


    if (node instanceof VariableDefinition) {
      final VariableDefinition vdef = (VariableDefinition)node;
      scope.setVariable(vdef.getName(), evalDefinition(scope, vdef));
        //spec: evaluate when it is defined (not when it is used)
    } else if (node instanceof FunctionDefinition) {
      final FunctionDefinition fd = (FunctionDefinition)node;
      scope.setVariable(fd.getName(), fd);
    } else if (node instanceof MixinDefinition) {
      final MixinDefinition fd = (MixinDefinition)node;
      scope.setVariable(fd.getName(), fd);
    } else if (node instanceof IfDefinition) { //assume not in a rule (outerSel shall be null)
      for (NodeInfo child: node.getChildren()) {
        final BlockDefinition block = (BlockDefinition)child;
        final Expression expr = block.getCondition();
        if (expr == null || isTrue(scope, expr)) {
View Full Code Here

TOP

Related Classes of org.zkoss.zuss.metainfo.FunctionDefinition

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.