Package com.bacoder.parser.java.JavaParser

Examples of com.bacoder.parser.java.JavaParser.StatementContext


        return processContinueStatement(context);
      case JavaParser.Identifier: {
        if (context.children.size() > 1
            && context.children.get(1) instanceof TerminalNode
            && ((TerminalNode) context.children.get(1)).getSymbol().getType() == JavaParser.COLON) {
          StatementContext statementContext = getChild(context, StatementContext.class);
          if (statementContext != null) {
            Statement statement = adapt(statementContext);
            statement.setLabel(getAdapter(IdentifierAdapter.class).adapt(firstTerminal));
            setNodeAttributes(statement, firstTerminal, statementContext);
            return statement;
View Full Code Here


  }

  protected DoWhileStatement processDoWhileStatement(StatementContext context) {
    DoWhileStatement doWhileStatement = createNode(context, DoWhileStatement.class);

    StatementContext statementContext = getChild(context, StatementContext.class);
    if (statementContext != null) {
      doWhileStatement.setStatement(getAdapter(StatementAdapter.class).adapt(statementContext));
    }

    ParExpressionContext parExpressionContext = getChild(context, ParExpressionContext.class);
View Full Code Here

        forStatement.setControl(forEachControl);
      }
    }

    StatementContext statementContext = getChild(context, StatementContext.class);
    if (statementContext != null) {
      forStatement.setStatement(getAdapter(StatementAdapter.class).adapt(statementContext));
    }

    return forStatement;
View Full Code Here

    WhileStatement whileStatement = createNode(context, WhileStatement.class);

    ParExpressionContext parExpressionContext = getChild(context, ParExpressionContext.class);
    whileStatement.setCondition(processParExpression(parExpressionContext));

    StatementContext statementContext = getChild(context, StatementContext.class);
    if (statementContext != null) {
      whileStatement.setStatement(getAdapter(StatementAdapter.class).adapt(statementContext));
    }

    return whileStatement;
View Full Code Here

        setNodeAttributes(localVariableDeclaration, localVariableDeclarationStatementContext);
        return localVariableDeclaration;
      }
    }

    StatementContext statementContext = getChild(context, StatementContext.class);
    if (statementContext != null) {
      return getAdapter(StatementAdapter.class).adapt(statementContext);
    }

    TypeDeclarationContext typeDeclarationContext = getChild(context, TypeDeclarationContext.class);
View Full Code Here

TOP

Related Classes of com.bacoder.parser.java.JavaParser.StatementContext

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.