コード例 #1
0
 public static string Spelling(this in CXCursor cursor)
 {
     using (var spelling = ClangString.FromCursor(cursor))
     {
         return(spelling.ToString());
     }
 }
コード例 #2
0
        public static (uint, FileLocation) CursorHashLocation(this in CXCursor cursor)
        {
            var hash     = libclang.clang_hashCursor(cursor);
            var location = ClangLocation.Create(cursor);

            if (location.file == IntPtr.Zero)
            {
                return(hash, default);
            }
            var fileLocation = new FileLocation(ClangString.FromFile(location.file).ToString(), location.line, location.column, (int)location.begin, (int)location.end);

            return(hash, fileLocation);
        }