Exemple #1
0
        protected override string TryParse(ParseContext ctx)
        {
            var sb      = new StringBuilder();
            var currArg = ctx.PeekNext(ctx.FindNextCharNotInsideNormalBracket(',', true, forceEntireText: true) -
                                       ctx.CurrentPosition);

            for (var i = 0; i < currArg.Length; i++)
            {
                var c = currArg[i];
                if (c == ':' && currArg.IndexOf(':', i + 1) == -1)
                {
                    break;
                }
                sb.Append(c);
            }

            ctx.ReadNext(sb.Length);

            return(!sb.IsEmpty() ? sb.ToString() : null);
        }