Package com.google.minijoe.compiler.ast

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


    readToken(Token.OPERATOR_COLON);

    propertyValue = parseAssignmentExpression(true);

    return new ObjectLiteralProperty(propertyName, propertyValue);
  }
View Full Code Here


        new ExpressionStatement(
            new AssignmentExpression(
                new Identifier("foo"),
                new ObjectLiteral(
                    new ObjectLiteralProperty[] {
                        new ObjectLiteralProperty(
                            new StringLiteral("name"),
                            new StringLiteral("wibble")
                        )
                    }
                )
            )
        ),
        "foo = {name: \"wibble\"};"
    );
    assertParserOutput(
        new ExpressionStatement(
            new AssignmentExpression(
                new Identifier("foo"),
                new ObjectLiteral(
                    new ObjectLiteralProperty[] {
                        new ObjectLiteralProperty(
                            new StringLiteral("name"),
                            new StringLiteral("wibble")
                        ),
                        new ObjectLiteralProperty(
                            new StringLiteral("value"),
                            new NumberLiteral(1.0)
                        )
                    }
                )
View Full Code Here

TOP

Related Classes of com.google.minijoe.compiler.ast.ObjectLiteralProperty

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.