Пример #1
0
        private bool CheckTag(string inCtagsLine, CtagsParser.Tag.EType inExpectedType, string inExpectedName)
        {
            bool        result = true;
            CtagsParser parser = new CtagsParser("");

            CtagsParser.Tag tag = parser.GetTag(inCtagsLine);
            result = result && (inExpectedType == tag.GetTagType());
            result = result && (inExpectedName == tag.GetName());
            return(result);
        }
Пример #2
0
        /// <summary>
        /// Check if inContents contain the given tag.
        /// </summary>
        private bool FileContentsContainTag(string inContents, CtagsParser.Tag inTag)
        {
            if (FileContentsContainString(inContents, inTag.GetName()))
            {
                return(true);
            }
            if (inTag.GetTagType() == CtagsParser.Tag.EType.EStruct ||
                inTag.GetTagType() == CtagsParser.Tag.EType.EClass)
            {
                List <string> variations = GetNameVariations(inTag.GetName(), mConfig.TypeAliasPrefixes, mConfig.TypeAliasSuffixes);
                foreach (string name in variations)
                {
                    if (FileContentsContainString(inContents, name))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }