Akka.Configuration.Hocon.HoconTokenizer.PullWhitespaceAndComments C# (CSharp) Метод

PullWhitespaceAndComments() публичный Метод

Advances the tokenizer to the next non-whitespace, non-comment token.
public PullWhitespaceAndComments ( ) : void
Результат void
        public void PullWhitespaceAndComments()
        {
            do
            {
                PullWhitespace();
                while (IsStartOfComment())
                {
                    PullComment();
                }
            } while (IsWhitespace());
        }

Usage Example

Пример #1
0
        public void ParseValue(HoconValue owner)
        {
            if (reader.EoF)
            {
                throw new Exception("End of file reached while trying to read a value");
            }

            bool isObject = owner.IsObject();

            reader.PullWhitespaceAndComments();
            while (reader.IsValue())
            {
                Token t = reader.PullValue();

                switch (t.Type)
                {
                case TokenType.EoF:
                    break;

                case TokenType.LiteralValue:
                    if (isObject)
                    {
                        //needed to allow for override objects
                        isObject = false;
                        owner.Clear();
                    }
                    var lit = new HoconLiteral
                    {
                        Value = t.Value
                    };
                    owner.AppendValue(lit);

                    break;

                case TokenType.ObjectStart:
                    ParseObject(owner, true);
                    break;

                case TokenType.ArrayStart:
                    HoconArray arr = ParseArray();
                    owner.AppendValue(arr);
                    break;

                case TokenType.Substitute:
                    HoconSubstitution sub = ParseSubstitution(t.Value);
                    substitutions.Add(sub);
                    owner.AppendValue(sub);
                    break;
                }
                if (reader.IsSpaceOrTab())
                {
                    ParseTrailingWhitespace(owner);
                }
            }

            IgnoreComma();
        }
All Usage Examples Of Akka.Configuration.Hocon.HoconTokenizer::PullWhitespaceAndComments