Example #1
0
 public IdentifierAST ParseIdentifier()
 {
     if (Tok() != TokenType.String && Tok() != TokenType.QuotedString)
         throw new Exception(GetErrorMsg());
     var ast = new IdentifierAST();
     ast.value = Inc();
     return ast;
 }
Example #2
0
 public IdentifierAST ParseIdentifier()
 {
     if (Tok() != TokenType.String && Tok() != TokenType.QuotedString)
         throw new Exception(GetErrorMsg());
     var ast = new IdentifierAST();
     ast.value = Inc();
     return ast;
 }
Example #3
0
        public static PBXElementString ParseIdentifierAST(IdentifierAST ast, TokenList tokens, string text)
        {
            Token token = tokens[ast.value];

            switch (token.type)
            {
            case TokenType.String:
                return(new PBXElementString(text.Substring(token.begin, token.end - token.begin)));

            case TokenType.QuotedString:
                return(new PBXElementString(PBXStream.UnquoteString(text.Substring(token.begin, token.end - token.begin))));

            default:
                throw new Exception("Internal parser error");
            }
        }
Example #4
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)));
 }
Example #5
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))));
        }
Example #6
0
 public static PBXElementString ParseIdentifierAST(IdentifierAST ast, TokenList tokens, string text)
 {
     Token tok = tokens[ast.value];
     string value;
     switch (tok.type)
     {
         case TokenType.String:
             value = text.Substring(tok.begin, tok.end - tok.begin);
             return new PBXElementString(value);
         case TokenType.QuotedString:
             value = text.Substring(tok.begin, tok.end - tok.begin);
             value = PBXStream.UnquoteString(value);
             return new PBXElementString(value);
         default:
             throw new Exception("Internal parser error");
     }
 }