AcManager.Tools.Helpers.Vdf.VdfTokenizer.ReadNext C# (CSharp) Method

ReadNext() public method

public ReadNext ( ) : VdfToken?
return VdfToken?
            public VdfToken? ReadNext() {
                if (IsFinished) return null;

                while (char.IsWhiteSpace(_content[_pos])) {
                    ++_pos;
                    if (IsFinished) return null;
                }

                switch (_content[_pos++]) {
                    case '{':
                        return VdfToken.Begin;
                    case '}':
                        return VdfToken.End;
                    case '"':
                        if (IsFinished) return null;
                        var start = _pos;
                        while (_content[_pos] != '"') {
                            ++_pos;
                            if (IsFinished) return null;
                        }

                        _value = _content.Substring(start, _pos++ - start);
                        return VdfToken.String;
                    default:
                        throw new Exception("Unexpected token");
                }
            }