public SourceRange GetSourceRange(SourceLocation start, SourceLocation end) { Library.SourceRange handle = Library.clang_getRange(start.Handle, end.Handle); return _itemStore.CreateSourceRange(handle); }
static SourceLocation() { NullLocation = Library.clang_getNullLocation(); }
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); }
internal static extern SourceRange clang_getRange(SourceLocation start, SourceLocation end);
internal static unsafe extern void clang_getInstantiationLocation(SourceLocation location, IntPtr* file, out uint line, out uint column, out uint offset);
internal static extern Cursor clang_getCursor(IntPtr tu, SourceLocation loc);
internal static extern uint clang_equalLocations(SourceLocation l1, SourceLocation l2);
/// <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); }