Examples of Conditional


Examples of ch.njol.skript.lang.Conditional

            continue;
          if (Skript.debug() || n.debug())
            Skript.debug(indentation + cond.toString(null, true) + ":");
          final Kleenean hadDelayBefore = hasDelayBefore;
          hadDelayBeforeLastIf = hadDelayBefore;
          items.add(new Conditional(cond, (SectionNode) n));
          hasDelayBefore = hadDelayBefore.or(hasDelayBefore.and(Kleenean.UNKNOWN));
        }
      }
    }
   
View Full Code Here

Examples of com.consol.citrus.container.Conditional

       
        assertEquals(builder.testCase().getActions().size(), 1);
        assertEquals(builder.testCase().getActions().get(0).getClass(), Conditional.class);
        assertEquals(builder.testCase().getActions().get(0).getName(), "conditional");
       
        Conditional container = (Conditional)builder.testCase().getActions().get(0);
        assertEquals(container.getActions().size(), 1);
        assertEquals(container.getExpression(), "${var} = 5");
    }
View Full Code Here

Examples of com.consol.citrus.container.Conditional

    public void testFailActionParser() {

        this.assertActionCount(1);
        this.assertActionClassAndName(Conditional.class, "conditional");

        final Conditional action = this.getNextTestActionFromTest();
        Assert.assertEquals(action.getActionCount(), 2);
    }
View Full Code Here

Examples of com.google.caja.parser.js.Conditional

      if (newChildren.size() < 2) {
        out.node = newChildren.isEmpty()
            ? new Noop(UNK) : (Statement) newChildren.get(0);
        out.digest = optNodeDigest(out.node);
      } else {
        out.node = new Conditional(UNK, null, newChildren);
        out.digest = sb != null ? sb.toString() : null;
      }
    } else {
      out.node = c;
      out.digest = sb != null ? sb.toString() : null;
View Full Code Here

Examples of com.google.caja.parser.js.Conditional

          if (allExit) {
            //    if (foo) return bar; else baz();
            // => if (foo) return bar; baz();
            return combine(
                n.getFilePosition(),
                new Conditional(
                    FilePosition.span(
                        n.getFilePosition(),
                        condParts.get(nCondParts - 1).getFilePosition()),
                null, condParts.subList(0, nCondParts - 1)),
                (Statement) condParts.get(nCondParts - 1));
View Full Code Here

Examples of com.google.caja.parser.js.Conditional

          // where the statement following the if, is implicitly an else
          // statement since the if always returns or throws.
          // We create a fake conditional, and try to optimize it in isolation,
          // which would yield (return baz ? boo() : far()) for the above.
          // This feeds into the tail handling for expression runs below.
          Conditional combined = condAndImplicitElse((Conditional) last, next);
          if (combined != null) {
            ParseTreeNode optCond = optimize(combined, false);
            if (isExpressionListTerminator(optCond)) {
              stmts.subList(i - 1, i + 1).clear();
              stmts.add(i - 1, last = (Statement) optCond);
View Full Code Here

Examples of com.google.caja.parser.js.Conditional

    for (int i = children.size() - 1; i >= 3; i -= 2) {
      if (children.get(i).getClass() != commonType) { return null; }
    }
    List<ParseTreeNode> allChildren = Lists.newArrayList(children);
    allChildren.add(follower);
    return new Conditional(
        FilePosition.span(cond.getFilePosition(), follower.getFilePosition()),
        null, allChildren);
  }
View Full Code Here

Examples of com.google.caja.parser.js.Conditional

        nodes.set(i, returnLast(nodes.get(i)));
      }
      if ((lasti & 1) == 0) {  // else clause
        nodes.set(lasti, returnLast(nodes.get(lasti)));
      }
      result = new Conditional(node.getFilePosition(), null, nodes);
    } else if (node instanceof TryStmt) {
      TryStmt tryer = (TryStmt) node;
      result = new TryStmt(
          node.getFilePosition(),
          (Block) returnLast(tryer.getBody()),
View Full Code Here

Examples of com.google.caja.parser.js.Conditional

          if (allExit) {
            //    if (foo) return bar; else baz();
            // => if (foo) return bar; baz();
            return combine(
                n.getFilePosition(),
                new Conditional(
                    FilePosition.span(
                        n.getFilePosition(),
                        condParts.get(nCondParts - 1).getFilePosition()),
                null, condParts.subList(0, nCondParts - 1)),
                (Statement) condParts.get(nCondParts - 1));
View Full Code Here

Examples of com.google.caja.parser.js.Conditional

          // where the statement following the if, is implicitly an else
          // statement since the if always returns or throws.
          // We create a fake conditional, and try to optimize it in isolation,
          // which would yield (return baz ? boo() : far()) for the above.
          // This feeds into the tail handling for expression runs below.
          Conditional combined = condAndImplicitElse((Conditional) last, next);
          if (combined != null) {
            ParseTreeNode optCond = optimize(combined, false);
            if (isExpressionListTerminator(optCond)) {
              stmts.subList(i - 1, i + 1).clear();
              stmts.add(i - 1, last = (Statement) optCond);
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.