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

ParsePlainTextFirstCharInFlow() private method

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

            char ch = MatchTerminalSet("\r\n\t -?:,[]{}#&*!|>'\"%@`", true, out success);
            if (success)
            {
                ClearError(errorCount);
                text.Append(ch);
                return text.ToString();
            }

            while (true)
            {
                int seq_start_position1 = position;
                ch = MatchTerminalSet("-?:", false, out success);
                if (success) { text.Append(ch); }
                else
                {
                    Error("Failed to parse \"-?:\" of PlainTextFirstCharInFlow.");
                    break;
                }

                ch = ParseNonSpaceSep(out success);
                if (success) { text.Append(ch); }
                else
                {
                    Error("Failed to parse NonSpaceSep of PlainTextFirstCharInFlow.");
                    position = seq_start_position1;
                }
                break;
            }
            if (success) { ClearError(errorCount); return text.ToString(); }

            return text.ToString();
        }
YamlParser