Examples of ArrayLiteralNode


Examples of org.apache.flex.compiler.internal.tree.as.ArrayLiteralNode

    }

    @Test
    public void testVisitArrayLiteral_1()
    {
        ArrayLiteralNode node = (ArrayLiteralNode) getExpressionNode(
                "a = [0,1,2]", ArrayLiteralNode.class);
        asBlockWalker.visitLiteral(node);
        assertOut("[0, 1, 2]");
    }
View Full Code Here

Examples of org.apache.flex.compiler.internal.tree.as.ArrayLiteralNode

    }

    @Test
    public void testVisitArrayLiteral_2()
    {
        ArrayLiteralNode node = (ArrayLiteralNode) getExpressionNode(
                "a = [0,[0,1,[0,1]],2,[1,2]]", ArrayLiteralNode.class);
        asBlockWalker.visitLiteral(node);
        assertOut("[0, [0, 1, [0, 1]], 2, [1, 2]]");
    }
View Full Code Here

Examples of org.apache.flex.compiler.internal.tree.as.ArrayLiteralNode

    }

    @Test
    public void testVisitArrayLiteral_1()
    {
        ArrayLiteralNode node = (ArrayLiteralNode) getExpressionNode(
                "a = [0,1,2]", ArrayLiteralNode.class);
        visitor.visitLiteral(node);
        assertOut("[0,1,2]");
    }
View Full Code Here

Examples of org.apache.flex.compiler.internal.tree.as.ArrayLiteralNode

    }

    @Test
    public void testVisitArrayLiteral_2()
    {
        ArrayLiteralNode node = (ArrayLiteralNode) getExpressionNode(
                "a = [0,[0,1,[0,1]],2,[1,2]]", ArrayLiteralNode.class);
        visitor.visitLiteral(node);
        assertOut("[0,[0,1,[0,1]],2,[1,2]]");
    }
View Full Code Here

Examples of st.gravel.support.compiler.ast.ArrayLiteralNode

  }

  public String[] primitiveIn_(final String _className) {
    final PragmaNode _pragma;
    final Expression _argument;
    final ArrayLiteralNode _arrayNode;
    _pragma = this.primitivePragma();
    if (_pragma == null) {
      return null;
    }
    _argument = _pragma.expression().argument();
    if (_argument.isStringLiteralNode()) {
      return MethodNode.this.localPrimitiveIn_nameNode_(_className, ((StringLiteralNode) _argument));
    }
    if (!_argument.isArrayLiteralNode()) {
      return null;
    }
    _arrayNode = ((ArrayLiteralNode) _argument);
    return st.gravel.support.jvm.ArrayExtensions.collect_(_arrayNode.value(), ((st.gravel.support.jvm.Block1<String, Object>) (new st.gravel.support.jvm.Block1<String, Object>() {

      @Override
      public String value_(final Object _e) {
        final String _str;
        _str = ((String) _e);
View Full Code Here

Examples of st.gravel.support.compiler.ast.ArrayLiteralNode

    assertEquals((String) "foo: arg1 bar: arg2\n\t^bar", (String) _node.prettySourceString());
  }

  @Test
  public void testParseLiteralArray() {
    final ArrayLiteralNode _node;
    _node = ((ArrayLiteralNode) Parser.factory.source_("#(#foo foo \'foo\' 1 (a b c) #( a b c) ((x)) () #[1 2 3])").parseExpression());
    assertTrue(st.gravel.support.jvm.ObjectExtensions.equals_(_node.factory(), ArrayLiteralNode.factory));
    assertEquals((String) "#(#foo #foo \'foo\' 1 #(#a #b #c) #(#a #b #c) #(#(#x)) #() #[1 2 3])", (String) _node.prettySourceString());
    assertTrue(st.gravel.support.jvm.IntegerExtensions.equals_(_node.value().length, 9));
  }
View Full Code Here

Examples of st.gravel.support.compiler.ast.ArrayLiteralNode

    assertEquals((String) "\n[\n| a b |\na foo.\nb bar]", (String) _node.prettySourceString());
  }

  @Test
  public void testParseNilInArray1() {
    final ArrayLiteralNode _node;
    _node = ((ArrayLiteralNode) Parser.factory.source_("#(nil)").parseExpression());
    assertEquals((st.gravel.support.jvm.SmalltalkFactory) ArrayLiteralNode.factory, (st.gravel.support.jvm.SmalltalkFactory) _node.factory());
    assertEquals((Object) null, (Object) _node.value()[0]);
  }
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.