Beispiel #1
0
        public override IEnumerable <object> ConvertTokens(IEnumerable <object> sequence)
        {
            var enumerator = sequence.GetEnumerator();

            while (enumerator.MoveNext())
            {
                var item = enumerator.Current;

                while (item is WordExpressionToken word)
                {
                    item = GetNext(enumerator);
                    if (item is AssignmentToken)
                    {
                        yield return(HandlebarsExpression.HashParameterAssignmentExpression(word.Value));

                        item = GetNext(enumerator);
                    }
                    else
                    {
                        yield return(word);
                    }
                }

                yield return(item);
            }
        }