Package japa.parser.ast.expr

Examples of japa.parser.ast.expr.Expression


        }
        throw new Error("Missing return statement in function");
    }

    final public Expression MemberValue() throws ParseException {
        Expression ret;
        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
            case AT:
                ret = Annotation();
                break;
            case LBRACE:
View Full Code Here


        throw new Error("Missing return statement in function");
    }

    final public Expression MemberValueArrayInitializer() throws ParseException {
        List ret = new LinkedList();
        Expression member;
        int line;
        int column;
        jj_consume_token(LBRACE);
        line = token.beginLine;
        column = token.beginColumn;
View Full Code Here

    }

    final public AnnotationMemberDeclaration AnnotationTypeMemberDeclaration(Modifier modifier) throws ParseException {
        Type type;
        String name;
        Expression defaultVal = null;
        type = Type();
        jj_consume_token(IDENTIFIER);
        name = token.image;
        jj_consume_token(LPAREN);
        jj_consume_token(RPAREN);
View Full Code Here

        }
        throw new Error("Missing return statement in function");
    }

    final public Expression DefaultValue() throws ParseException {
        Expression ret;
        jj_consume_token(_DEFAULT);
        ret = MemberValue();
        {
            if (true) {
                return ret;
View Full Code Here

   * @throws IOException
   */
  public static Expression parseExpression(final String expression)
      throws ParseException {
    StringReader sr = new StringReader(expression);
    Expression e = new ASTParser(sr).Expression();
    sr.close();
    return e;
  }
View Full Code Here

  @Override
  public Node visit(AnnotationMemberDeclaration _n, Object _arg) {
    JavadocComment javaDoc = cloneNodes(_n.getJavaDoc(), _arg);
    List<AnnotationExpr> annotations = visit(_n.getAnnotations(), _arg);
    Type type_ = cloneNodes(_n.getType(), _arg);
    Expression defaultValue = cloneNodes(_n.getDefaultValue(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    AnnotationMemberDeclaration r = new AnnotationMemberDeclaration(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
         _n.getModifiers(), annotations, type_, _n.getName(), defaultValue
View Full Code Here

  }

  @Override
  public Node visit(VariableDeclarator _n, Object _arg) {
    VariableDeclaratorId id = cloneNodes(_n.getId(), _arg);
    Expression init = cloneNodes(_n.getInit(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    VariableDeclarator r = new VariableDeclarator(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        id, init
View Full Code Here

    return r;
  }

  @Override
  public Node visit(ArrayAccessExpr _n, Object _arg) {
    Expression name = cloneNodes(_n.getName(), _arg);
    Expression index = cloneNodes(_n.getIndex(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    ArrayAccessExpr r = new ArrayAccessExpr(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        name, index
View Full Code Here

    return r;
  }

  @Override
  public Node visit(AssignExpr _n, Object _arg) {
    Expression target = cloneNodes(_n.getTarget(), _arg);
    Expression value = cloneNodes(_n.getValue(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    AssignExpr r = new AssignExpr(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        target, value, _n.getOperator());
View Full Code Here

    return r;
  }

  @Override
  public Node visit(BinaryExpr _n, Object _arg) {
    Expression left = cloneNodes(_n.getLeft(), _arg);
    Expression right = cloneNodes(_n.getRight(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    BinaryExpr r = new BinaryExpr(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        left, right, _n.getOperator()
View Full Code Here

TOP

Related Classes of japa.parser.ast.expr.Expression

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.