Package japa.parser.ast.stmt

Examples of japa.parser.ast.stmt.ExpressionStmt


     *
     * @param block
     * @param stmt
     */
    public static void addStmt(BlockStmt block, Expression expr) {
        addStmt(block, new ExpressionStmt(expr));
    }
View Full Code Here


    public Boolean visit(EmptyStmt n1, Node arg) {
        return Boolean.TRUE;
    }

    public Boolean visit(ExpressionStmt n1, Node arg) {
        ExpressionStmt n2 = (ExpressionStmt) arg;

        if (!nodeEquals(n1.getExpression(), n2.getExpression())) {
            return Boolean.FALSE;
        }

        return Boolean.TRUE;
    }
View Full Code Here

            typeDecl = ClassOrInterfaceDeclaration(modifier);
            ret = new TypeDeclarationStmt(typeDecl.getBeginLine(), typeDecl.getBeginColumn(), token.endLine, token.endColumn, typeDecl);
        } else if (jj_2_37(2147483647)) {
            expr = VariableDeclarationExpression();
            jj_consume_token(SEMICOLON);
            ret = new ExpressionStmt(expr.getBeginLine(), expr.getBeginColumn(), token.endLine, token.endColumn, expr);
        } else {
            switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
                case ASSERT:
                case BOOLEAN:
                case BREAK:
View Full Code Here

                throw new ParseException();
        }
        jj_consume_token(SEMICOLON);
        {
            if (true) {
                return new ExpressionStmt(expr.getBeginLine(), expr.getBeginColumn(), token.endLine, token.endColumn, expr);
            }
        }
        throw new Error("Missing return statement in function");
    }
View Full Code Here

     *
     * @param block
     * @param stmt
     */
    public static void addStmt(BlockStmt block, Expression expr) {
        addStmt(block, new ExpressionStmt(expr));
    }
View Full Code Here

  @Override
  public Node visit(ExpressionStmt _n, Object _arg) {
    Expression expr = cloneNodes(_n.getExpression(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    ExpressionStmt r = new ExpressionStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        expr
    );
    r.setComment(comment);
    return r;
  }
View Full Code Here

  @Override public Boolean visit(final EmptyStmt n1, final Node arg) {
    return Boolean.TRUE;
  }

  @Override public Boolean visit(final ExpressionStmt n1, final Node arg) {
    final ExpressionStmt n2 = (ExpressionStmt) arg;

    if (!nodeEquals(n1.getExpression(), n2.getExpression())) {
      return Boolean.FALSE;
    }

    return Boolean.TRUE;
  }
View Full Code Here

TOP

Related Classes of japa.parser.ast.stmt.ExpressionStmt

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.