Ejemplo n.º 1
0
        IPBXProjExpression ParseBaseExpression()
        {
            CheckForUnexpectedEndOfSource();

            if (_currentToken.Type != PBXProjTokenType.String)
            {
                throw new PBXProjParserException("Expected a string value, not " + _currentToken.Value);
            }

            string value = _currentToken.Value;
            //is it a bool
            PBXProjBoolean boolExpression = ParseBoolean(value);

            if (boolExpression != null)
            {
                ReadNextToken();
                return(boolExpression);
            }

            PBXProjString stringExpression = ParseString(value);

            if (stringExpression != null)
            {
                ReadNextToken();
                return(stringExpression);
            }

            return(null);
        }
Ejemplo n.º 2
0
        public void AddBoolBuildSetting(string settingName, bool value)
        {
            if (string.IsNullOrEmpty(settingName))
            {
                return;
            }

            BaseBuildSetting baseSetting = null;

            XcodeBuildSettings.Instance().BuildSetting(settingName, out baseSetting);

            //we don't know about it (custom) or it is not a bool
            if (baseSetting == null || baseSetting is BoolBuildSetting)
            {
                //TODO check for bool conditional
                BuildSettings[settingName] = new PBXProjBoolean(value);
            }
            else
            {
                Debug.LogError("EgoXproject: " + settingName + " is not a boolean build setting");
            }
        }