YamlUtility.Grammar.YamlParser.ParseSingleQuotedSingleLine C# (CSharp) Method

ParseSingleQuotedSingleLine() private method

private ParseSingleQuotedSingleLine ( bool &success ) : string
success bool
return string
        private string ParseSingleQuotedSingleLine(out bool success)
        {
            int errorCount = Errors.Count;
            StringBuilder text = new StringBuilder();
            int start_position = position;

            MatchTerminal('\'', out success);
            if (!success)
            {
                Error("Failed to parse ''' of SingleQuotedSingleLine.");
                position = start_position;
                return text.ToString();
            }

            while (true)
            {
                ErrorStatck.Push(errorCount); errorCount = Errors.Count;
                while (true)
                {
                    char ch = MatchTerminalSet("'\r\n", true, out success);
                    if (success)
                    {
                        ClearError(errorCount);
                        text.Append(ch);
                        break;
                    }

                    ch = ParseEscapedSingleQuote(out success);
                    if (success)
                    {
                        ClearError(errorCount);
                        text.Append(ch);
                        break;
                    }

                    break;
                }
                errorCount = ErrorStatck.Pop();
                if (!success) { break; }
            }
            success = true;

            MatchTerminal('\'', out success);
            if (!success)
            {
                Error("Failed to parse ''' of SingleQuotedSingleLine.");
                position = start_position;
            }

            if (success) { ClearError(errorCount); }
            return text.ToString();
        }
YamlParser