Exemplo n.º 1
0
        public static ConstantDefinition Create(uint hash, FileLocation location, IEnumerable <string> tokens)
        {
            var name = tokens.First();

            if (name == "CINDEX_VERSION")
            {
                var values = tokens.Skip(1).ToArray();
                // CINDEX_VERSION_ENCODE(major, minor)
                if (values.Length != 6)
                {
                    throw new Exception();
                }
                return(new ConstantDefinition(hash, location, name, new string[] {
                    "CINDEX_VERSION_MAJOR", "*", "10000", "+", "CINDEX_VERSION_MINOR"
                }));
            }
            if (name == "CINDEX_VERSION_STRING")
            {
            }
            return(new ConstantDefinition(hash, location, name, tokens.Skip(1).ToArray()));
        }
Exemplo n.º 2
0
 bool IsContainedInRootHeaders(FileLocation location)
 {
     return(m_rootHeaders.Any(x => x.Equals(location.Path)));
 }