private bool IsIndentGreaterOrEmptyLine()

in resharper/resharper-yaml/src/Yaml/Psi/Parsing/YamlLexerGenerated.cs [316:361]


    private bool IsIndentGreaterOrEmptyLine(int parentIndent)
    {
      currentLineIndent = 0;
      while (true)
      {
        if (yy_buffer_index == yy_eof_pos)
          break;

        if (Buffer[yy_buffer_index] == ' ')
        {
          currentLineIndent++;
        }
        else
        {
          break;
        }

        yy_buffer_index++;
        
      }

      if (yy_buffer_index + 2 < yy_eof_pos)
      {
        if (Buffer[yy_buffer_index] == '-' && (Buffer[yy_buffer_index  + 1] == ' ' || 
                                               Buffer[yy_buffer_index  + 1] == '\r' ||
                                               Buffer[yy_buffer_index  + 1] == '\n' ))
        {
          currentLineIndent += 2;
        }
      }

      // hack for multiline strings with empty lines
      // TODO 2019.3 krasnotsvetov RIDER-31051
      if (currentLineIndent == 0)
      {
        if (yy_buffer_index == yy_eof_pos)
          return false;
        
        var curChar = Buffer[yy_buffer_index];
        if (curChar == '\r' || curChar == '\n' || curChar == '\'' || curChar == '"')
          return true;

      }
      
      return currentLineIndent > parentIndent;
    }