Documentation
¶
Overview ¶
Package cursorutil provides utility functions for working with inspector.Cursor.
It should create no additional dependencies beyond those of Cursor itself, so that functions can be promoted to the public API of Cursor in due course.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstEnclosing ¶
FirstEnclosing returns the first value from [cursor.Enclosing] as both a designated type and a inspector.Cursor pointing to it.
It returns the zero value if it is not found.
A common usage is:
call, callCur := cursorutil.FirstEnclosing[*ast.CallExpr](cur)
if call == nil {
// Not Found
}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.