Package japa.parser.ast.comments

Examples of japa.parser.ast.comments.Comment


  }

  @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
    );
View Full Code Here


  @Override
  public Node visit(SwitchStmt _n, Object _arg) {
    Expression selector = cloneNodes(_n.getSelector(), _arg);
    List<SwitchEntryStmt> entries = visit(_n.getEntries(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    SwitchStmt r = new SwitchStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        selector, entries
    );
View Full Code Here

  @Override
  public Node visit(SwitchEntryStmt _n, Object _arg) {
    Expression label = cloneNodes(_n.getLabel(), _arg);
    List<Statement> stmts = visit(_n.getStmts(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    SwitchEntryStmt r = new SwitchEntryStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        label, stmts
    );
View Full Code Here

    return r;
  }

  @Override
  public Node visit(BreakStmt _n, Object _arg) {
    Comment comment = cloneNodes(_n.getComment(), _arg);

    BreakStmt r = new BreakStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        _n.getId()
    );
View Full Code Here

  }

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

    ReturnStmt r = new ReturnStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        expr
    );
View Full Code Here

  @Override
  public Node visit(IfStmt _n, Object _arg) {
    Expression condition = cloneNodes(_n.getCondition(), _arg);
    Statement thenStmt = cloneNodes(_n.getThenStmt(), _arg);
    Statement elseStmt = cloneNodes(_n.getElseStmt(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    IfStmt r = new IfStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        condition, thenStmt, elseStmt
    );
View Full Code Here

  @Override
  public Node visit(WhileStmt _n, Object _arg) {
    Expression condition = cloneNodes(_n.getCondition(), _arg);
    Statement body = cloneNodes(_n.getBody(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    WhileStmt r = new WhileStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        condition, body
    );
View Full Code Here

    return r;
  }

  @Override
  public Node visit(ContinueStmt _n, Object _arg) {
    Comment comment = cloneNodes(_n.getComment(), _arg);

    ContinueStmt r = new ContinueStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        _n.getId()
    );
View Full Code Here

  @Override
  public Node visit(DoStmt _n, Object _arg) {
    Statement body = cloneNodes(_n.getBody(), _arg);
    Expression condition = cloneNodes(_n.getCondition(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    DoStmt r = new DoStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        body, condition
    );
View Full Code Here

  @Override
  public Node visit(ForeachStmt _n, Object _arg) {
    VariableDeclarationExpr var = cloneNodes(_n.getVariable(), _arg);
    Expression iterable = cloneNodes(_n.getIterable(), _arg);
    Statement body = cloneNodes(_n.getBody(), _arg);
    Comment comment = cloneNodes(_n.getComment(), _arg);

    ForeachStmt r = new ForeachStmt(
        _n.getBeginLine(), _n.getBeginColumn(), _n.getEndLine(), _n.getEndColumn(),
        var, iterable, body
    );
View Full Code Here

TOP

Related Classes of japa.parser.ast.comments.Comment

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.