Examples of NumberLiteral


Examples of com.google.minijoe.compiler.ast.NumberLiteral

    assertParserOutput(
        new ExpressionStatement(
            new NewExpression(
                new Identifier("Object"),
                new Expression[] {
                  new NumberLiteral(1.0)
                }
            )
        ),
        "new Object(1.0);"
    );
    assertParserOutput(
        new ExpressionStatement(
            new NewExpression(
                new Identifier("Object"),
                new Expression[] {
                  new NumberLiteral(1.0),
                  new StringLiteral("hatstand")
                }
            )
        ),
        "new Object(1.0, 'hatstand');"
View Full Code Here

Examples of com.google.minijoe.compiler.ast.NumberLiteral

    assertParserOutput(
        new ExpressionStatement(
            new CallExpression(
                new Identifier("thing"),
                new Expression[] {
                  new NumberLiteral(1.0)
                }
            )
        ),
        "thing(1.0);"
    );
    assertParserOutput(
        new ExpressionStatement(
            new CallExpression(
                new Identifier("thing"),
                new Expression[] {
                  new NumberLiteral(1.0),
                  new StringLiteral("hatstand")
                }
            )
        ),
        "thing(1.0, 'hatstand');"
View Full Code Here

Examples of com.google.minijoe.compiler.ast.NumberLiteral

        ),
        "return;"
    );
    assertParserOutput(
        new ReturnStatement(
            new NumberLiteral(0)
        ),
        "return 0;"
    );
    assertParserOutput(
        new ReturnStatement(
View Full Code Here

Examples of com.google.minijoe.compiler.ast.NumberLiteral

                    new PropertyExpression(
                        new NewExpression(
                            new Identifier("foo"),
                            new Expression[] {
                              new Identifier("String"),
                              new NumberLiteral(2.0)
                            }
                        ),
                        new StringLiteral("bar")
                    ),
                    new Expression[] {
                      new NumberLiteral(42)
                    }
                ),
                new StringLiteral("baz")
            )
        ),
View Full Code Here

Examples of com.google.minijoe.compiler.ast.NumberLiteral

                new Statement[] {
                    new VariableStatement(
                        new VariableDeclaration[] {
                            new VariableDeclaration(
                                new Identifier("bar"),
                                new NumberLiteral(0.0)
                            )
                        }
                    )
                }
            )
View Full Code Here

Examples of com.google.minijoe.compiler.ast.NumberLiteral

        new ExpressionStatement(
            new BinaryOperatorExpression(
                new Identifier("foo"),
                new BinaryOperatorExpression(
                    new Identifier("bar"),
                    new NumberLiteral(1.0),
                    Token.OPERATOR_PLUS
                ),
                Token.OPERATOR_LESSTHAN
            )
        ),
View Full Code Here

Examples of com.google.minijoe.compiler.ast.NumberLiteral

        new ExpressionStatement(
            new BinaryOperatorExpression(
                new Identifier("foo"),
                new BinaryOperatorExpression(
                    new Identifier("bar"),
                    new NumberLiteral(1.0),
                    Token.OPERATOR_PLUS
                ),
                Token.OPERATOR_LESSTHANOREQUAL
            )
        ),
View Full Code Here

Examples of net.sourceforge.htmlunit.corejs.javascript.ast.NumberLiteral

        this(nodeType, left, mid, right);
        lineno = line;
    }

    public static Node newNumber(double number) {
        NumberLiteral n = new NumberLiteral();
        n.setNumber(number);
        return n;
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.NumberLiteral

    final Expression leftExpCopy = (Expression) ASTNode.copySubtree(ast, ie
        .getLeftOperand());
    final Expression rightExpCopy = (Expression) ASTNode.copySubtree(ast,
        ie.getRightOperand());

    final NumberLiteral zero = ast.newNumberLiteral();
    astRewrite.replace(ie.getRightOperand(), zero, null);

    final MethodInvocation newInvocation = ast.newMethodInvocation();
    newInvocation.setExpression(leftExpCopy);
    newInvocation.setName(ast.newSimpleName("compareTo")); //$NON-NLS-1$
View Full Code Here

Examples of org.eclipse.jdt.core.dom.NumberLiteral

      TypeDeclaration td) {
    VariableDeclarationFragment fragment = ast
        .newVariableDeclarationFragment();
    SimpleName variableName = ast.newSimpleName("serialVersionUID");
    fragment.setName(variableName);
    NumberLiteral initializer = ast.newNumberLiteral();
    initializer.setToken("1L");
    fragment.setInitializer(initializer);

    FieldDeclaration fieldDeclaration = ast.newFieldDeclaration(fragment);
    fieldDeclaration.modifiers().add(
        ast.newModifier(Modifier.ModifierKeyword.PRIVATE_KEYWORD));
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.