예제 #1
0
 /// <summary>
 /// Map a source location to the cursor that describes the entity at that location in the source code.
 /// GetCursor() maps an arbitrary source location within a translation unit down to the most specific
 /// cursor that describes the entity at that location. For example, given an expression x + y, invoking
 /// GetCursor() with a source location pointing to "x" will return the cursor for "x"; similarly for "y".
 /// If the cursor points anywhere between "x" or "y" (e.g., on the + or the whitespace around it),
 /// GetCursor() will return a cursor referring to the "+" expression.
 /// </summary>
 /// <param name="location">The location to find a cursor at.</param>
 /// <returns></returns>
 public Cursor GetCursor(SourceLocation location)
 {
     return(new Cursor(Interop.clang_getCursor(Native, location.Native)));
 }