예제 #1
0
 private void SkipIf(UnityEditor.iOS.Xcode.PBX.TokenType type)
 {
     if (this.Tok() == type)
     {
         this.Inc();
     }
 }
예제 #2
0
 private void ScanOperatorSpecific(Token tok, UnityEditor.iOS.Xcode.PBX.TokenType type)
 {
     tok.type  = type;
     tok.begin = this.pos;
     this.pos++;
     tok.end  = this.pos;
     tok.line = this.line;
 }
예제 #3
0
        public static PBXElementString ParseIdentifierAST(IdentifierAST ast, TokenList tokens, string text)
        {
            Token token = tokens[ast.value];

            UnityEditor.iOS.Xcode.PBX.TokenType type = token.type;
            if (type != UnityEditor.iOS.Xcode.PBX.TokenType.String)
            {
                if (type != UnityEditor.iOS.Xcode.PBX.TokenType.QuotedString)
                {
                    throw new Exception("Internal parser error");
                }
            }
            else
            {
                return(new PBXElementString(text.Substring(token.begin, token.end - token.begin)));
            }
            return(new PBXElementString(PBXStream.UnquoteString(text.Substring(token.begin, token.end - token.begin))));
        }