Package com.bacoder.parser.java.api

Examples of com.bacoder.parser.java.api.ClassExpression


      case JavaParser.SUPER:
        return createNode(context, SuperExpression.class);
      case JavaParser.Identifier:
        return getAdapter(IdentifierAdapter.class).adapt(firstTerminal);
      case JavaParser.VOID: {
        ClassExpression classExpression = createNode(context, ClassExpression.class);
        classExpression.setType(createNode(firstTerminal, VoidType.class));
        return classExpression;
      }
      default:
      }
    }

    LiteralContext literalContext = getChild(context, LiteralContext.class);
    if (literalContext != null) {
      Literal literal = createNode(context, Literal.class);

      TerminalNode terminal = getChild(literalContext, TerminalNode.class);
      if (terminal != null && LITERAL_TYPE_MAP.containsKey(terminal.getSymbol().getType())) {
        literal.setType(LITERAL_TYPE_MAP.get(terminal.getSymbol().getType()));
        literal.setText(terminal.getText());
      }

      return literal;
    }

    TypeContext typeContext = getChild(context, TypeContext.class);
    if (typeContext != null) {
      ClassExpression classExpression = createNode(context, ClassExpression.class);
      classExpression.setType(getAdapter(TypeAdapter.class).adapt(typeContext));
      return classExpression;
    }

    return processInvocationExpression(context);
  }
View Full Code Here

TOP

Related Classes of com.bacoder.parser.java.api.ClassExpression

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.