Exemplo n.º 1
0
        public PBXProjDictionary Parse(TextReader source)
        {
            if (source == null)
            {
                throw new ArgumentNullException((source).ToString(), "Must provide a valid TextReader source");
            }

            _currentToken = null;
            _tokenizer    = new PBXProjTokenizer(source);
            // read the first token
            ReadNextToken();

            //A poor file type check
            if (AtEndOfSource || _currentToken.Type != PBXProjTokenType.Comment && _currentToken.Value != header)
            {
                throw new PBXProjParserException("Text source is not a valid pbxproj file");
            }

            ReadNextToken();
            return(ParseDictionary());
        }
Exemplo n.º 2
0
 void ReadNextToken()
 {
     _currentToken = _tokenizer.ReadNextToken();
 }