private TokenNodeType ContinueRawInterpolatedString()

in ReSharper.FSharp/src/FSharp/FSharp.Psi/src/Parsing/Lexing/FSharpLexerGenerated.Supplement.cs [152:202]


    private TokenNodeType ContinueRawInterpolatedString(int dollarCount, bool isStart)
    {
      while (yy_buffer_index < yy_eof_pos)
      {
        if (yy_buffer_index == yy_eof_pos)
        {
          return MakeRawStringToken(FSharpTokenType.UNFINISHED_RAW_INTERPOLATED_STRING);
        }

        var ch = yy_buffer[yy_buffer_index];
        if (ch == '{')
        {
          var braceCount = ConsumeCharSequence('{');
          if (braceCount >= dollarCount)
          {
            var tokenType = isStart
              ? FSharpTokenType.RAW_INTERPOLATED_STRING_START
              : FSharpTokenType.RAW_INTERPOLATED_STRING_MIDDLE;
            return MakeRawStringToken(tokenType);
          }
          
          continue;
        }

        if (ch == '\"')
        {
          var quoteCount = ConsumeCharSequence('\"', 3);
          if (quoteCount == 3)
          {
            var tokenType = isStart
              ? FSharpTokenType.RAW_INTERPOLATED_STRING
              : FSharpTokenType.RAW_INTERPOLATED_STRING_END;

            myInterpolatedStringStates = myInterpolatedStringStates.Pop();
            return MakeRawStringToken(tokenType);
          }

          continue;
        }
        
        yy_buffer_index++;
      }

      return MakeRawStringToken(FSharpTokenType.UNFINISHED_RAW_INTERPOLATED_STRING);

      TokenNodeType MakeRawStringToken(TokenNodeType tokenType)
      {
        yy_buffer_end = yy_buffer_index;
        return MakeToken(tokenType);
      }
    }