Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQmlJS::Dom::AstRangesVisitor Class Referencefinal
Inheritance diagram for QQmlJS::Dom::AstRangesVisitor:
Collaboration diagram for QQmlJS::Dom::AstRangesVisitor:

Public Member Functions

 AstRangesVisitor ()=default
void addNodeRanges (AST::Node *rootNode)
void addItemRanges (const DomItem &item, const FileLocations::Tree &itemLocations, const Path &currentP)
void throwRecursionDepthError () override
void addSourceLocations (Node *n, qsizetype start, qsizetype end, CommentAnchor commentAnchor)
void addSourceLocations (Node *n)
void addSourceLocations (Node *n, const SourceLocation &sourceLocation)
bool preVisit (Node *n) override
bool visit (Block *block) override
bool visit (CaseClause *caseClause) override
bool visit (ClassDeclaration *classDeclaration) override
bool visit (DoWhileStatement *doWhileStatement) override
bool visit (FormalParameterList *list) override
bool visit (ForStatement *forStatement) override
bool visit (FunctionExpression *fExpr) override
bool visit (FunctionDeclaration *fExpr) override
bool visit (WhileStatement *whileStatement) override
bool visit (Type *type) override
bool visit (UiQualifiedId *id) override
 AstRangesVisitor ()=default
void addNodeRanges (AST::Node *rootNode)
void addItemRanges (const DomItem &item, const FileLocations::Tree &itemLocations, const Path &currentP)
void throwRecursionDepthError () override
void addSourceLocations (Node *n, qsizetype start, qsizetype end, CommentAnchor commentAnchor)
void addSourceLocations (Node *n)
void addSourceLocations (Node *n, const SourceLocation &sourceLocation)
bool preVisit (Node *n) override
bool visit (Block *block) override
bool visit (CaseClause *caseClause) override
bool visit (ClassDeclaration *classDeclaration) override
bool visit (DoWhileStatement *doWhileStatement) override
bool visit (FormalParameterList *list) override
bool visit (ForStatement *forStatement) override
bool visit (FunctionExpression *fExpr) override
bool visit (FunctionDeclaration *fExpr) override
bool visit (WhileStatement *whileStatement) override
bool visit (Type *type) override
bool visit (UiQualifiedId *id) override
bool visit (AST::UiPublicMember *el) override
bool visit (AST::UiSourceElement *el) override
bool visit (AST::UiObjectDefinition *el) override
bool visit (AST::UiObjectBinding *el) override
bool visit (AST::UiScriptBinding *el) override
bool visit (AST::UiArrayBinding *el) override
bool visit (AST::UiParameterList *el) override
bool visit (AST::UiEnumDeclaration *el) override
bool visit (AST::UiInlineComponent *el) override
bool visit (AST::TemplateLiteral *el) override

Static Public Member Functions

static const QSet< int > kindsToSkip ()
static bool shouldSkipRegion (const DomItem &item, FileLocationRegion region)
 returns true if comments should skip attaching to this region
static const QSet< int > kindsToSkip ()
static bool shouldSkipRegion (const DomItem &item, FileLocationRegion region)

Public Attributes

QMap< qsizetype, ElementRefstarts
QMap< qsizetype, ElementRefends

Additional Inherited Members

Protected Member Functions inherited from QQmlJS::Dom::VisitAll
 VisitAll ()=default
void throwRecursionDepthError () override
bool visit (AST::UiPublicMember *el) override
bool visit (AST::UiSourceElement *el) override
bool visit (AST::UiObjectDefinition *el) override
bool visit (AST::UiObjectBinding *el) override
bool visit (AST::UiScriptBinding *el) override
bool visit (AST::UiArrayBinding *el) override
bool visit (AST::UiParameterList *el) override
bool visit (AST::UiQualifiedId *el) override
bool visit (AST::UiEnumDeclaration *el) override
bool visit (AST::UiInlineComponent *el) override
void endVisit (AST::UiImport *el) override
void endVisit (AST::UiPublicMember *el) override
void endVisit (AST::UiParameterList *el) override
void endVisit (AST::UiEnumMemberList *el) override
bool visit (AST::TemplateLiteral *el) override
void endVisit (AST::Elision *el) override
Protected Member Functions inherited from QQmlJS::AST::Visitor
 Visitor (quint16 parentRecursionDepth=0)
bool preVisit (Node *) override
void postVisit (Node *) override
Protected Member Functions inherited from QQmlJS::AST::BaseVisitor
 BaseVisitor (quint16 parentRecursionDepth=0)
virtual ~BaseVisitor ()
quint16 recursionDepth () const
Static Protected Member Functions inherited from QQmlJS::Dom::VisitAll
static QSet< int > uiKinds ()
 returns a set with all Ui* Nodes (i.e.
Protected Attributes inherited from QQmlJS::AST::BaseVisitor
quint16 m_recursionDepth = 0

Detailed Description

Definition at line 344 of file qqmldomcomments.cpp.

Constructor & Destructor Documentation

◆ AstRangesVisitor() [1/2]

QQmlJS::Dom::AstRangesVisitor::AstRangesVisitor ( )
default

◆ AstRangesVisitor() [2/2]

QQmlJS::Dom::AstRangesVisitor::AstRangesVisitor ( )
default

Member Function Documentation

◆ addItemRanges() [1/2]

void QQmlJS::Dom::AstRangesVisitor::addItemRanges ( const DomItem & item,
const FileLocations::Tree & itemLocations,
const Path & currentP )

Definition at line 504 of file qqmldomcomments.cpp.

References addItemRanges(), QQmlJS::Dom::DomItem::path(), shouldSkipRegion(), and QQmlJS::Dom::Path::withPath().

Referenced by addItemRanges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addItemRanges() [2/2]

void QQmlJS::Dom::AstRangesVisitor::addItemRanges ( const DomItem & item,
const FileLocations::Tree & itemLocations,
const Path & currentP )

◆ addNodeRanges() [1/2]

void QQmlJS::Dom::AstRangesVisitor::addNodeRanges ( AST::Node * rootNode)

Definition at line 499 of file qqmldomcomments.cpp.

◆ addNodeRanges() [2/2]

void QQmlJS::Dom::AstRangesVisitor::addNodeRanges ( AST::Node * rootNode)

◆ addSourceLocations() [1/6]

void QQmlJS::Dom::AstRangesVisitor::addSourceLocations ( Node * n)
inline

Definition at line 365 of file qqmldomcomments.cpp.

◆ addSourceLocations() [2/6]

void QQmlJS::Dom::AstRangesVisitor::addSourceLocations ( Node * n)
inline

Definition at line 365 of file qqmldomcomments.cpp.

◆ addSourceLocations() [3/6]

void QQmlJS::Dom::AstRangesVisitor::addSourceLocations ( Node * n,
const SourceLocation & sourceLocation )
inline

Definition at line 370 of file qqmldomcomments.cpp.

◆ addSourceLocations() [4/6]

void QQmlJS::Dom::AstRangesVisitor::addSourceLocations ( Node * n,
const SourceLocation & sourceLocation )
inline

Definition at line 370 of file qqmldomcomments.cpp.

◆ addSourceLocations() [5/6]

void QQmlJS::Dom::AstRangesVisitor::addSourceLocations ( Node * n,
qsizetype start,
qsizetype end,
CommentAnchor commentAnchor )
inline

Definition at line 358 of file qqmldomcomments.cpp.

◆ addSourceLocations() [6/6]

void QQmlJS::Dom::AstRangesVisitor::addSourceLocations ( Node * n,
qsizetype start,
qsizetype end,
CommentAnchor commentAnchor )
inline

Definition at line 358 of file qqmldomcomments.cpp.

◆ kindsToSkip() [1/2]

const QSet< int > QQmlJS::Dom::AstRangesVisitor::kindsToSkip ( )
static

Definition at line 535 of file qqmldomcomments.cpp.

◆ kindsToSkip() [2/2]

const QSet< int > QQmlJS::Dom::AstRangesVisitor::kindsToSkip ( )
static

◆ preVisit() [1/2]

bool QQmlJS::Dom::AstRangesVisitor::preVisit ( Node * n)
inlineoverridevirtual

Implements QQmlJS::AST::BaseVisitor.

Definition at line 378 of file qqmldomcomments.cpp.

◆ preVisit() [2/2]

bool QQmlJS::Dom::AstRangesVisitor::preVisit ( Node * n)
inlineoverridevirtual

Implements QQmlJS::AST::BaseVisitor.

Definition at line 378 of file qqmldomcomments.cpp.

◆ shouldSkipRegion() [1/2]

bool QQmlJS::Dom::AstRangesVisitor::shouldSkipRegion ( const DomItem & item,
FileLocationRegion region )
static

returns true if comments should skip attaching to this region

Definition at line 558 of file qqmldomcomments.cpp.

References QQmlJS::Dom::DomItem::internalKind().

Referenced by addItemRanges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ shouldSkipRegion() [2/2]

bool QQmlJS::Dom::AstRangesVisitor::shouldSkipRegion ( const DomItem & item,
FileLocationRegion region )
static

◆ throwRecursionDepthError() [1/2]

void QQmlJS::Dom::AstRangesVisitor::throwRecursionDepthError ( )
inlineoverridevirtual

Implements QQmlJS::AST::BaseVisitor.

Definition at line 353 of file qqmldomcomments.cpp.

◆ throwRecursionDepthError() [2/2]

void QQmlJS::Dom::AstRangesVisitor::throwRecursionDepthError ( )
inlineoverridevirtual

Implements QQmlJS::AST::BaseVisitor.

Definition at line 353 of file qqmldomcomments.cpp.

◆ visit() [1/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::TemplateLiteral * el)
inlineoverride

Definition at line 389 of file qqmldomcomments_p.h.

◆ visit() [2/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::UiArrayBinding * el)
inlineoverride

Definition at line 345 of file qqmldomcomments_p.h.

◆ visit() [3/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::UiEnumDeclaration * el)
inlineoverride

Definition at line 363 of file qqmldomcomments_p.h.

◆ visit() [4/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::UiInlineComponent * el)
inlineoverride

Definition at line 369 of file qqmldomcomments_p.h.

◆ visit() [5/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::UiObjectBinding * el)
inlineoverride

Definition at line 333 of file qqmldomcomments_p.h.

◆ visit() [6/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::UiObjectDefinition * el)
inlineoverride

Definition at line 327 of file qqmldomcomments_p.h.

◆ visit() [7/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::UiParameterList * el)
inlineoverride

Definition at line 351 of file qqmldomcomments_p.h.

◆ visit() [8/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::UiPublicMember * el)
inlineoverride

Definition at line 314 of file qqmldomcomments_p.h.

◆ visit() [9/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::UiScriptBinding * el)
inlineoverride

Definition at line 339 of file qqmldomcomments_p.h.

◆ visit() [10/32]

bool QQmlJS::Dom::VisitAll::visit ( AST::UiSourceElement * el)
inlineoverride

Definition at line 321 of file qqmldomcomments_p.h.

◆ visit() [11/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( Block * block)
inlineoverride

Definition at line 387 of file qqmldomcomments.cpp.

◆ visit() [12/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( Block * block)
inlineoverride

Definition at line 387 of file qqmldomcomments.cpp.

◆ visit() [13/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( CaseClause * caseClause)
inlineoverride

Definition at line 396 of file qqmldomcomments.cpp.

◆ visit() [14/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( CaseClause * caseClause)
inlineoverride

Definition at line 396 of file qqmldomcomments.cpp.

◆ visit() [15/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( ClassDeclaration * classDeclaration)
inlineoverride

Definition at line 403 of file qqmldomcomments.cpp.

◆ visit() [16/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( ClassDeclaration * classDeclaration)
inlineoverride

Definition at line 403 of file qqmldomcomments.cpp.

◆ visit() [17/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( DoWhileStatement * doWhileStatement)
inlineoverride

Definition at line 412 of file qqmldomcomments.cpp.

◆ visit() [18/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( DoWhileStatement * doWhileStatement)
inlineoverride

Definition at line 412 of file qqmldomcomments.cpp.

◆ visit() [19/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( FormalParameterList * list)
inlineoverride

Definition at line 421 of file qqmldomcomments.cpp.

◆ visit() [20/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( FormalParameterList * list)
inlineoverride

Definition at line 421 of file qqmldomcomments.cpp.

◆ visit() [21/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( ForStatement * forStatement)
inlineoverride

Definition at line 427 of file qqmldomcomments.cpp.

◆ visit() [22/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( ForStatement * forStatement)
inlineoverride

Definition at line 427 of file qqmldomcomments.cpp.

◆ visit() [23/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( FunctionDeclaration * fExpr)
inlineoverride

Definition at line 446 of file qqmldomcomments.cpp.

◆ visit() [24/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( FunctionDeclaration * fExpr)
inlineoverride

Definition at line 446 of file qqmldomcomments.cpp.

◆ visit() [25/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( FunctionExpression * fExpr)
inlineoverride

Definition at line 436 of file qqmldomcomments.cpp.

◆ visit() [26/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( FunctionExpression * fExpr)
inlineoverride

Definition at line 436 of file qqmldomcomments.cpp.

◆ visit() [27/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( Type * type)
inlineoverride

Definition at line 460 of file qqmldomcomments.cpp.

◆ visit() [28/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( Type * type)
inlineoverride

Definition at line 460 of file qqmldomcomments.cpp.

◆ visit() [29/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( UiQualifiedId * id)
inlineoverride

Definition at line 476 of file qqmldomcomments.cpp.

◆ visit() [30/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( UiQualifiedId * id)
inlineoverride

Definition at line 476 of file qqmldomcomments.cpp.

◆ visit() [31/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( WhileStatement * whileStatement)
inlineoverride

Definition at line 451 of file qqmldomcomments.cpp.

◆ visit() [32/32]

bool QQmlJS::Dom::AstRangesVisitor::visit ( WhileStatement * whileStatement)
inlineoverride

Definition at line 451 of file qqmldomcomments.cpp.

Member Data Documentation

◆ ends

QMap< qsizetype, ElementRef > QQmlJS::Dom::AstRangesVisitor::ends

Definition at line 493 of file qqmldomcomments.cpp.

◆ starts

QMap< qsizetype, ElementRef > QQmlJS::Dom::AstRangesVisitor::starts

Definition at line 492 of file qqmldomcomments.cpp.


The documentation for this class was generated from the following file: