Beispiel #1
0
 public SourceRange GetSourceRange(SourceLocation start, SourceLocation end)
 {
     Library.SourceRange handle = Library.clang_getRange(start.Handle, end.Handle);
     return _itemStore.CreateSourceRange(handle);
 }
Beispiel #2
0
 static SourceLocation()
 {
     NullLocation = Library.clang_getNullLocation();
 }
Beispiel #3
0
        public Cursor GetCursorAt(SourceLocation location)
        {
            if (location == null)
                throw new ArgumentException("null Location passed to GetCursotAt().");

            Library.Cursor cur = Library.clang_getCursor(Handle, location.Handle);
            if (cur.IsNull)
                return null;
            cur = Library.clang_getCursor(Handle, location.Handle);
            return _itemStore.CreateCursor(cur);
        }
Beispiel #4
0
 internal static extern SourceRange clang_getRange(SourceLocation start, SourceLocation end);
Beispiel #5
0
 internal static unsafe extern void clang_getInstantiationLocation(SourceLocation location, IntPtr* file, 
                                     out uint line, out uint column, out uint offset);
Beispiel #6
0
 internal static extern Cursor clang_getCursor(IntPtr tu, SourceLocation loc);
Beispiel #7
0
 internal static extern uint clang_equalLocations(SourceLocation l1, SourceLocation l2);
Beispiel #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SourceRange"/> class.
 /// </summary>
 /// <param name="begin">The begin<see cref="SourceLocation"/></param>
 /// <param name="end">The end<see cref="SourceLocation"/></param>
 public SourceRange(SourceLocation begin, SourceLocation end)
 {
     this.m_value = clang.clang_getRange((CXSourceLocation)begin.Value, (CXSourceLocation)end.Value);
 }