Package com.google.minijoe.compiler.ast

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


      result = parseExpression(true);
    }

    readTokenSemicolon();

    return new ReturnStatement(result);
  }
View Full Code Here


    super(name);
  }

  public void testReturnStatement() throws CompilerException {
    assertParserOutput(
        new ReturnStatement(
            null
        ),
        "return;"
    );
    assertParserOutput(
        new ReturnStatement(
            new NumberLiteral(0)
        ),
        "return 0;"
    );
    assertParserOutput(
        new ReturnStatement(
            new BooleanLiteral(true)
        ),
        "return true;"
    );
  }
View Full Code Here

TOP

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

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.