Пример #1
0
  private static JetParsing createForByClause(SemanticWhitespaceAwarePsiBuilder builder) {
    final SemanticWhitespaceAwarePsiBuilderForByClause builderForByClause =
        new SemanticWhitespaceAwarePsiBuilderForByClause(builder);
    JetParsing jetParsing = new JetParsing(builderForByClause);
    jetParsing.myExpressionParsing =
        new JetExpressionParsing(builderForByClause, jetParsing) {
          @Override
          protected boolean parseCallWithClosure() {
            if (builderForByClause.getStackSize() > 0) {
              return super.parseCallWithClosure();
            }
            return false;
          }

          @Override
          protected JetParsing create(SemanticWhitespaceAwarePsiBuilder builder) {
            return createForByClause(builder);
          }
        };
    return jetParsing;
  }
Пример #2
0
 static JetParsing createForTopLevel(SemanticWhitespaceAwarePsiBuilder builder) {
   JetParsing jetParsing = new JetParsing(builder);
   jetParsing.myExpressionParsing = new JetExpressionParsing(builder, jetParsing);
   return jetParsing;
 }