Package com.google.minijoe.compiler.ast

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


    readToken(Token.OPERATOR_OPENPAREN);
    expression = parseExpression(true);
    readToken(Token.OPERATOR_CLOSEPAREN);
    statement = parseStatement();

    return new WhileStatement(expression, statement);
  }
View Full Code Here


    assertParserOutput(
        new LabelledStatement(
            new Identifier("foo"),
            new LabelledStatement(
                new Identifier("bar"),
                new WhileStatement(
                    new BooleanLiteral(true),
                    new BlockStatement(
                        new Statement[] {
                            new ExpressionStatement(
                                new Identifier("baz")
View Full Code Here

    super(name);
  }

  public void testWhileStatement() throws CompilerException {
    assertParserOutput(
        new WhileStatement(
            new BooleanLiteral(true),
            new ExpressionStatement(
                new Identifier("something")
            )
        ),
        "while (true) something;"
    );
    assertParserOutput(
        new WhileStatement(
            new BooleanLiteral(true),
            new BlockStatement(
                new Statement[] {
                    new ExpressionStatement(
                        new Identifier("something")
View Full Code Here

TOP

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

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.