record TCursorHelper

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TCursorHelper = record helper for TCursor

Description

Extends TCursor

Overview

Methods

function VisitChildren(const AVisitor: TCursorVisitor): Boolean; overload;
function VisitChildren(const AVisitor: TCursorVisitorMethod): Boolean; overload;
function FindReferencesInFile(const AFile: TFile; const AVisitor: TCursorAndRangeVisitor): TVisitorResult; overload;
function FindReferencesInFile(const AFile: TFile; const AVisitor: TCursorAndRangeVisitorMethod): TVisitorResult; overload;

Description

Methods

function VisitChildren(const AVisitor: TCursorVisitor): Boolean; overload;
function VisitChildren(const AVisitor: TCursorVisitorMethod): Boolean; overload;

Visit the children of this cursor.

This function visits all the direct children of the given cursor, invoking the given visitor function with the cursors of each visited child. The traversal may be recursive, if the visitor returns TChildVisitResult.Recurse. The traversal may also be ended prematurely, if the visitor returns TChildVisitResult.Break.

Parameters
AVisitor
the visitor function that will be invoked for each child of this cursor.
Returns

True if the traversal was terminated prematurely by the visitor returning TChildVisitResult.Break.

function FindReferencesInFile(const AFile: TFile; const AVisitor: TCursorAndRangeVisitor): TVisitorResult; overload;
function FindReferencesInFile(const AFile: TFile; const AVisitor: TCursorAndRangeVisitorMethod): TVisitorResult; overload;

Find references of a declaration in a specific file.

Parameters
AFile
file to search for references.
AVisitor
callback that will receive pairs of TCursor/TSourceRange for each reference found. The TSourceRange will point inside the file; if the reference is inside a macro (and not a macro argument) the TSourceRange will be invalid.
Returns

A TVisitResult value


Generated by PasDocEx, based on PasDoc 0.14.0.