Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQmlJS::Dom::ScriptFormatter Class Referencefinal

#include <qqmldomreformatter_p.h>

+ Inheritance diagram for QQmlJS::Dom::ScriptFormatter:
+ Collaboration diagram for QQmlJS::Dom::ScriptFormatter:

Public Member Functions

 ScriptFormatter (OutWriter &lw, const std::shared_ptr< AstComments > &comments, const std::function< QStringView(SourceLocation)> &loc2Str, AST::Node *node)
 

Protected Member Functions

void out (const char *str)
 
void out (QStringView str)
 
void out (const SourceLocation &loc)
 
void newLine (quint32 count=1)
 
void accept (AST::Node *node)
 
void lnAcceptIndented (AST::Node *node)
 
bool acceptBlockOrIndented (AST::Node *ast, bool finishWithSpaceOrNewline=false)
 
bool preVisit (AST::Node *n) override
 
void postVisit (AST::Node *n) override
 
bool visit (AST::ThisExpression *ast) override
 
bool visit (AST::NullExpression *ast) override
 
bool visit (AST::TrueLiteral *ast) override
 
bool visit (AST::FalseLiteral *ast) override
 
bool visit (AST::IdentifierExpression *ast) override
 
bool visit (AST::StringLiteral *ast) override
 
bool visit (AST::NumericLiteral *ast) override
 
bool visit (AST::RegExpLiteral *ast) override
 
bool visit (AST::ArrayPattern *ast) override
 
bool visit (AST::ObjectPattern *ast) override
 
bool visit (AST::PatternElementList *ast) override
 
bool visit (AST::PatternPropertyList *ast) override
 
bool visit (AST::PatternProperty *property) override
 
bool visit (AST::NestedExpression *ast) override
 
bool visit (AST::IdentifierPropertyName *ast) override
 
bool visit (AST::StringLiteralPropertyName *ast) override
 
bool visit (AST::NumericLiteralPropertyName *ast) override
 
bool visit (AST::TemplateLiteral *ast) override
 
bool visit (AST::ArrayMemberExpression *ast) override
 
bool visit (AST::FieldMemberExpression *ast) override
 
bool visit (AST::NewMemberExpression *ast) override
 
bool visit (AST::NewExpression *ast) override
 
bool visit (AST::CallExpression *ast) override
 
bool visit (AST::PostIncrementExpression *ast) override
 
bool visit (AST::PostDecrementExpression *ast) override
 
bool visit (AST::PreIncrementExpression *ast) override
 
bool visit (AST::PreDecrementExpression *ast) override
 
bool visit (AST::DeleteExpression *ast) override
 
bool visit (AST::VoidExpression *ast) override
 
bool visit (AST::TypeOfExpression *ast) override
 
bool visit (AST::UnaryPlusExpression *ast) override
 
bool visit (AST::UnaryMinusExpression *ast) override
 
bool visit (AST::TildeExpression *ast) override
 
bool visit (AST::NotExpression *ast) override
 
bool visit (AST::BinaryExpression *ast) override
 
bool visit (AST::ConditionalExpression *ast) override
 
bool visit (AST::Block *ast) override
 
bool visit (AST::VariableStatement *ast) override
 
bool visit (AST::PatternElement *ast) override
 
bool visit (AST::EmptyStatement *ast) override
 
bool visit (AST::IfStatement *ast) override
 
bool visit (AST::DoWhileStatement *ast) override
 
bool visit (AST::WhileStatement *ast) override
 
bool visit (AST::ForStatement *ast) override
 
bool visit (AST::ForEachStatement *ast) override
 
bool visit (AST::ContinueStatement *ast) override
 
bool visit (AST::BreakStatement *ast) override
 
bool visit (AST::ReturnStatement *ast) override
 
bool visit (AST::ThrowStatement *ast) override
 
bool visit (AST::WithStatement *ast) override
 
bool visit (AST::SwitchStatement *ast) override
 
bool visit (AST::CaseBlock *ast) override
 
bool visit (AST::CaseClause *ast) override
 
bool visit (AST::DefaultClause *ast) override
 
bool visit (AST::LabelledStatement *ast) override
 
bool visit (AST::TryStatement *ast) override
 
bool visit (AST::Catch *ast) override
 
bool visit (AST::Finally *ast) override
 
bool visit (AST::FunctionDeclaration *ast) override
 
bool visit (AST::FunctionExpression *ast) override
 
bool visit (AST::Elision *ast) override
 
bool visit (AST::ArgumentList *ast) override
 
bool visit (AST::StatementList *ast) override
 
bool visit (AST::VariableDeclarationList *ast) override
 
bool visit (AST::CaseClauses *ast) override
 
bool visit (AST::FormalParameterList *ast) override
 
bool visit (AST::SuperLiteral *) override
 
bool visit (AST::ComputedPropertyName *) override
 
bool visit (AST::Expression *el) override
 
bool visit (AST::ExpressionStatement *el) override
 
bool visit (AST::ClassDeclaration *ast) override
 
bool visit (AST::ImportDeclaration *ast) override
 
bool visit (AST::ImportSpecifier *ast) override
 
bool visit (AST::NameSpaceImport *ast) override
 
bool visit (AST::ImportsList *ast) override
 
bool visit (AST::NamedImports *ast) override
 
bool visit (AST::ImportClause *ast) override
 
bool visit (AST::ExportDeclaration *ast) override
 
bool visit (AST::ExportClause *ast) override
 
bool visit (AST::ExportSpecifier *ast) override
 
bool visit (AST::ExportsList *ast) override
 
bool visit (AST::FromClause *ast) override
 
void endVisit (AST::ComputedPropertyName *) override
 
void endVisit (AST::ExportDeclaration *ast) override
 
void endVisit (AST::ExportClause *ast) override
 
void endVisit (AST::ImportDeclaration *ast) override
 
void endVisit (AST::NamedImports *ast) override
 
void throwRecursionDepthError () override
 
- Protected Member Functions inherited from QQmlJS::AST::JSVisitor
 JSVisitor ()=default
 
- Protected Member Functions inherited from QQmlJS::AST::BaseVisitor
 BaseVisitor (quint16 parentRecursionDepth=0)
 
virtual ~BaseVisitor ()
 
quint16 recursionDepth () const
 

Additional Inherited Members

- Protected Attributes inherited from QQmlJS::AST::BaseVisitor
quint16 m_recursionDepth = 0
 

Detailed Description

Definition at line 30 of file qqmldomreformatter_p.h.

Constructor & Destructor Documentation

◆ ScriptFormatter()

QQmlJS::Dom::ScriptFormatter::ScriptFormatter ( OutWriter & lw,
const std::shared_ptr< AstComments > & comments,
const std::function< QStringView(SourceLocation)> & loc2Str,
AST::Node * node )
inline

Definition at line 34 of file qqmldomreformatter_p.h.

References accept().

+ Here is the call graph for this function:

Member Function Documentation

◆ accept()

void QQmlJS::Dom::ScriptFormatter::accept ( AST::Node * node)
inlineprotected

Definition at line 51 of file qqmldomreformatter_p.h.

References QQmlJS::AST::Node::accept().

Referenced by ScriptFormatter(), acceptBlockOrIndented(), lnAcceptIndented(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().

+ Here is the call graph for this function:

◆ acceptBlockOrIndented()

bool QQmlJS::Dom::ScriptFormatter::acceptBlockOrIndented ( AST::Node * ast,
bool finishWithSpaceOrNewline = false )
protected

Definition at line 47 of file qqmldomreformatter.cpp.

References accept(), lnAcceptIndented(), newLine(), and out.

Referenced by visit(), visit(), visit(), visit(), visit(), and visit().

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

◆ endVisit() [1/5]

void QQmlJS::Dom::ScriptFormatter::endVisit ( AST::ComputedPropertyName * )
overrideprotected

Definition at line 1050 of file qqmldomreformatter.cpp.

References out.

◆ endVisit() [2/5]

void QQmlJS::Dom::ScriptFormatter::endVisit ( AST::ExportClause * ast)
overrideprotected

Definition at line 1089 of file qqmldomreformatter.cpp.

References QQmlJS::AST::ExportClause::exportsList, out, QQmlJS::AST::ExportClause::rightBraceToken, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ endVisit() [3/5]

◆ endVisit() [4/5]

void QQmlJS::Dom::ScriptFormatter::endVisit ( AST::ImportDeclaration * ast)
overrideprotected

Definition at line 1105 of file qqmldomreformatter.cpp.

References out.

◆ endVisit() [5/5]

void QQmlJS::Dom::ScriptFormatter::endVisit ( AST::NamedImports * ast)
overrideprotected

Definition at line 1097 of file qqmldomreformatter.cpp.

References QQmlJS::AST::NamedImports::importsList, out, QQmlJS::AST::NamedImports::rightBraceToken, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ lnAcceptIndented()

void QQmlJS::Dom::ScriptFormatter::lnAcceptIndented ( AST::Node * node)
protected

Definition at line 39 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::Dom::OutWriter::decreaseIndent(), QQmlJS::Dom::OutWriter::ensureNewline(), and QQmlJS::Dom::OutWriter::increaseIndent().

Referenced by acceptBlockOrIndented(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().

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

◆ newLine()

void QQmlJS::Dom::ScriptFormatter::newLine ( quint32 count = 1)
inlineprotected

Definition at line 49 of file qqmldomreformatter_p.h.

References QQmlJS::Dom::OutWriter::ensureNewline().

Referenced by acceptBlockOrIndented(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().

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

◆ out() [1/3]

void QQmlJS::Dom::ScriptFormatter::out ( const char * str)
inlineprotected

Definition at line 42 of file qqmldomreformatter_p.h.

References QString::fromLatin1(), str, and QQmlJS::Dom::OutWriter::write().

+ Here is the call graph for this function:

◆ out() [2/3]

void QQmlJS::Dom::ScriptFormatter::out ( const SourceLocation & loc)
inlineprotected

Definition at line 44 of file qqmldomreformatter_p.h.

References QQmlJS::SourceLocation::length, and out.

◆ out() [3/3]

void QQmlJS::Dom::ScriptFormatter::out ( QStringView str)
inlineprotected

Definition at line 43 of file qqmldomreformatter_p.h.

References str, and QQmlJS::Dom::OutWriter::write().

+ Here is the call graph for this function:

◆ postVisit()

void QQmlJS::Dom::ScriptFormatter::postVisit ( AST::Node * n)
overrideprotectedvirtual

Reimplemented from QQmlJS::AST::JSVisitor.

Definition at line 31 of file qqmldomreformatter.cpp.

Referenced by visit(), and visit().

+ Here is the caller graph for this function:

◆ preVisit()

bool QQmlJS::Dom::ScriptFormatter::preVisit ( AST::Node * n)
overrideprotectedvirtual

Reimplemented from QQmlJS::AST::JSVisitor.

Definition at line 23 of file qqmldomreformatter.cpp.

Referenced by visit(), and visit().

+ Here is the caller graph for this function:

◆ throwRecursionDepthError()

void QQmlJS::Dom::ScriptFormatter::throwRecursionDepthError ( )
overrideprotectedvirtual

Implements QQmlJS::AST::BaseVisitor.

Definition at line 1110 of file qqmldomreformatter.cpp.

References out.

◆ visit() [1/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ArgumentList * ast)
overrideprotected

Definition at line 795 of file qqmldomreformatter.cpp.

References accept(), it, and out.

+ Here is the call graph for this function:

◆ visit() [2/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ArrayMemberExpression * ast)
overrideprotected

Definition at line 295 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::ArrayMemberExpression::base, QQmlJS::Dom::OutWriter::decreaseIndent(), QQmlJS::AST::ArrayMemberExpression::expression, QQmlJS::Dom::OutWriter::increaseIndent(), QQmlJS::AST::ArrayMemberExpression::lbracketToken, out, and QQmlJS::AST::ArrayMemberExpression::rbracketToken.

+ Here is the call graph for this function:

◆ visit() [3/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ArrayPattern * ast)
overrideprotected

Definition at line 117 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::ArrayPattern::commaToken, QQmlJS::Dom::OutWriter::decreaseIndent(), QQmlJS::AST::ArrayPattern::elements, QQmlJS::Dom::OutWriter::increaseIndent(), QQmlJS::AST::lastListElement(), QQmlJS::AST::ArrayPattern::lbracketToken, newLine(), out, and QQmlJS::AST::ArrayPattern::rbracketToken.

+ Here is the call graph for this function:

◆ visit() [4/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::BinaryExpression * ast)
overrideprotected

Definition at line 417 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::BinaryExpression::left, QQmlJS::AST::BinaryExpression::operatorToken, out, and QQmlJS::AST::BinaryExpression::right.

+ Here is the call graph for this function:

◆ visit() [5/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::Block * ast)
overrideprotected

Definition at line 437 of file qqmldomreformatter.cpp.

References QQmlJS::AST::Block::lbraceToken, lnAcceptIndented(), newLine(), out, QQmlJS::AST::Block::rbraceToken, and QQmlJS::AST::Block::statements.

+ Here is the call graph for this function:

◆ visit() [6/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::BreakStatement * ast)
overrideprotected

Definition at line 596 of file qqmldomreformatter.cpp.

References QQmlJS::AST::BreakStatement::breakToken, QQmlJS::AST::BreakStatement::identifierToken, QStringView::isNull(), QQmlJS::AST::BreakStatement::label, and out.

+ Here is the call graph for this function:

◆ visit() [7/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::CallExpression * ast)
overrideprotected

Definition at line 331 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::CallExpression::arguments, QQmlJS::AST::CallExpression::base, QQmlJS::AST::CallExpression::lparenToken, out, and QQmlJS::AST::CallExpression::rparenToken.

+ Here is the call graph for this function:

◆ visit() [8/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::CaseBlock * ast)
overrideprotected

Definition at line 656 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::CaseBlock::clauses, QQmlJS::AST::CaseBlock::defaultClause, QQmlJS::AST::CaseBlock::lbraceToken, QQmlJS::AST::CaseBlock::moreClauses, newLine(), out, and QQmlJS::AST::CaseBlock::rbraceToken.

+ Here is the call graph for this function:

◆ visit() [9/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::CaseClause * ast)
overrideprotected

Definition at line 674 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::CaseClause::colonToken, QQmlJS::AST::CaseClause::expression, lnAcceptIndented(), out, and QQmlJS::AST::CaseClause::statements.

+ Here is the call graph for this function:

◆ visit() [10/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::CaseClauses * ast)
overrideprotected

Definition at line 855 of file qqmldomreformatter.cpp.

References accept(), it, and newLine().

+ Here is the call graph for this function:

◆ visit() [11/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::Catch * ast)
overrideprotected

Definition at line 715 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::Catch::catchToken, QQmlJS::AST::Catch::identifierToken, QQmlJS::AST::Catch::lparenToken, out, and QQmlJS::AST::Catch::statement.

+ Here is the call graph for this function:

◆ visit() [12/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ClassDeclaration * ast)
overrideprotected

◆ visit() [13/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ComputedPropertyName * )
overrideprotected

Definition at line 885 of file qqmldomreformatter.cpp.

References out.

◆ visit() [14/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ConditionalExpression * ast)
overrideprotected

Definition at line 427 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::ConditionalExpression::expression, QQmlJS::AST::ConditionalExpression::ko, QQmlJS::AST::ConditionalExpression::ok, and out.

+ Here is the call graph for this function:

◆ visit() [15/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ContinueStatement * ast)
overrideprotected

Definition at line 584 of file qqmldomreformatter.cpp.

References QQmlJS::AST::ContinueStatement::continueToken, QQmlJS::AST::ContinueStatement::identifierToken, QStringView::isNull(), QQmlJS::AST::ContinueStatement::label, and out.

+ Here is the call graph for this function:

◆ visit() [16/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::DefaultClause * ast)
overrideprotected

Definition at line 684 of file qqmldomreformatter.cpp.

References QQmlJS::AST::DefaultClause::colonToken, QQmlJS::AST::DefaultClause::defaultToken, lnAcceptIndented(), out, and QQmlJS::AST::DefaultClause::statements.

+ Here is the call graph for this function:

◆ visit() [17/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::DeleteExpression * ast)
overrideprotected

Definition at line 368 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::DeleteExpression::expression, and out.

+ Here is the call graph for this function:

◆ visit() [18/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::DoWhileStatement * ast)
overrideprotected

Definition at line 517 of file qqmldomreformatter.cpp.

References accept(), acceptBlockOrIndented(), QQmlJS::AST::DoWhileStatement::doToken, QQmlJS::AST::DoWhileStatement::expression, QQmlJS::AST::DoWhileStatement::lparenToken, out, QQmlJS::AST::DoWhileStatement::rparenToken, QQmlJS::AST::DoWhileStatement::statement, and QQmlJS::AST::DoWhileStatement::whileToken.

+ Here is the call graph for this function:

◆ visit() [19/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::Elision * ast)
overrideprotected

Definition at line 786 of file qqmldomreformatter.cpp.

References it, and out.

◆ visit() [20/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::EmptyStatement * ast)
overrideprotected

Definition at line 489 of file qqmldomreformatter.cpp.

References out, and QQmlJS::AST::EmptyStatement::semicolonToken.

◆ visit() [21/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ExportClause * ast)
overrideprotected

Definition at line 1008 of file qqmldomreformatter.cpp.

References QQmlJS::AST::ExportClause::exportsList, QQmlJS::AST::ExportClause::leftBraceToken, out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [22/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ExportDeclaration * ast)
overrideprotected

Definition at line 994 of file qqmldomreformatter.cpp.

References QQmlJS::AST::ExportDeclaration::exportDefault, QQmlJS::AST::ExportDeclaration::exportsAll(), QQmlJS::AST::ExportDeclaration::exportToken, out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [23/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ExportsList * ast)
overrideprotected

Definition at line 1029 of file qqmldomreformatter.cpp.

References accept(), it, out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [24/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ExportSpecifier * ast)
overrideprotected

Definition at line 1017 of file qqmldomreformatter.cpp.

References QQmlJS::AST::ExportSpecifier::exportedIdentifier, QQmlJS::AST::ExportSpecifier::exportedIdentifierToken, QQmlJS::AST::ExportSpecifier::identifier, QQmlJS::SourceLocation::isValid(), out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [25/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::Expression * el)
overrideprotected

Definition at line 890 of file qqmldomreformatter.cpp.

References accept(), el, QStringView::left(), out, and QStringView::right().

+ Here is the call graph for this function:

◆ visit() [26/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ExpressionStatement * el)
overrideprotected

Definition at line 897 of file qqmldomreformatter.cpp.

References el, and out.

◆ visit() [27/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::FalseLiteral * ast)
overrideprotected

Definition at line 79 of file qqmldomreformatter.cpp.

References QQmlJS::AST::FalseLiteral::falseToken, and out.

◆ visit() [28/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::FieldMemberExpression * ast)
overrideprotected

Definition at line 306 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::FieldMemberExpression::base, QQmlJS::AST::FieldMemberExpression::dotToken, QQmlJS::AST::FieldMemberExpression::identifierToken, and out.

+ Here is the call graph for this function:

◆ visit() [29/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::Finally * ast)
overrideprotected

Definition at line 726 of file qqmldomreformatter.cpp.

References accept(), out, and QQmlJS::AST::Finally::statement.

+ Here is the call graph for this function:

◆ visit() [30/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ForEachStatement * ast)
overrideprotected

◆ visit() [31/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::FormalParameterList * ast)
overrideprotected

Definition at line 865 of file qqmldomreformatter.cpp.

References accept(), it, and out.

+ Here is the call graph for this function:

◆ visit() [32/82]

◆ visit() [33/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::FromClause * ast)
overrideprotected

Definition at line 1041 of file qqmldomreformatter.cpp.

References QQmlJS::AST::FromClause::fromToken, QQmlJS::AST::FromClause::moduleSpecifierToken, out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [34/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::FunctionDeclaration * ast)
overrideprotected

Definition at line 733 of file qqmldomreformatter.cpp.

References visit().

+ Here is the call graph for this function:

◆ visit() [35/82]

◆ visit() [36/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::IdentifierExpression * ast)
overrideprotected

◆ visit() [37/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::IdentifierPropertyName * ast)
overrideprotected

Definition at line 261 of file qqmldomreformatter.cpp.

References QQmlJS::AST::IdentifierPropertyName::id, out, and QStringView::toString().

+ Here is the call graph for this function:

◆ visit() [38/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::IfStatement * ast)
overrideprotected

◆ visit() [39/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ImportClause * ast)
overrideprotected

Definition at line 982 of file qqmldomreformatter.cpp.

References QQmlJS::AST::ImportClause::importedDefaultBinding, QQmlJS::AST::ImportClause::importedDefaultBindingToken, QStringView::isNull(), QQmlJS::AST::ImportClause::namedImports, QQmlJS::AST::ImportClause::nameSpaceImport, out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [40/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ImportDeclaration * ast)
overrideprotected

Definition at line 930 of file qqmldomreformatter.cpp.

References QQmlJS::AST::ImportDeclaration::importToken, QStringView::isNull(), QQmlJS::AST::ImportDeclaration::moduleSpecifier, QQmlJS::AST::ImportDeclaration::moduleSpecifierToken, out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [41/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ImportsList * ast)
overrideprotected

Definition at line 962 of file qqmldomreformatter.cpp.

References accept(), it, out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [42/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ImportSpecifier * ast)
overrideprotected

Definition at line 940 of file qqmldomreformatter.cpp.

References QQmlJS::AST::ImportSpecifier::identifier, QQmlJS::AST::ImportSpecifier::identifierToken, QQmlJS::AST::ImportSpecifier::importedBindingToken, QStringView::isNull(), out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [43/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::LabelledStatement * ast)
overrideprotected

Definition at line 692 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::LabelledStatement::identifierToken, out, and QQmlJS::AST::LabelledStatement::statement.

+ Here is the call graph for this function:

◆ visit() [44/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::NamedImports * ast)
overrideprotected

Definition at line 973 of file qqmldomreformatter.cpp.

References QQmlJS::AST::NamedImports::importsList, QQmlJS::AST::NamedImports::leftBraceToken, out, and QQmlJS::Dom::OutWriter::space().

+ Here is the call graph for this function:

◆ visit() [45/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::NameSpaceImport * ast)
overrideprotected

Definition at line 952 of file qqmldomreformatter.cpp.

References QQmlJS::AST::NameSpaceImport::importedBindingToken, out, QQmlJS::Dom::OutWriter::space(), and QQmlJS::AST::NameSpaceImport::starToken.

+ Here is the call graph for this function:

◆ visit() [46/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::NestedExpression * ast)
overrideprotected

Definition at line 251 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::Dom::OutWriter::decreaseIndent(), QQmlJS::AST::NestedExpression::expression, QQmlJS::Dom::OutWriter::increaseIndent(), QQmlJS::AST::NestedExpression::lparenToken, out, and QQmlJS::AST::NestedExpression::rparenToken.

+ Here is the call graph for this function:

◆ visit() [47/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::NewExpression * ast)
overrideprotected

Definition at line 324 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::NewExpression::expression, and out.

+ Here is the call graph for this function:

◆ visit() [48/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::NewMemberExpression * ast)
overrideprotected

Definition at line 314 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::NewMemberExpression::arguments, QQmlJS::AST::NewMemberExpression::base, QQmlJS::AST::NewMemberExpression::lparenToken, out, and QQmlJS::AST::NewMemberExpression::rparenToken.

+ Here is the call graph for this function:

◆ visit() [49/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::NotExpression * ast)
overrideprotected

Definition at line 410 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::NotExpression::expression, QQmlJS::AST::NotExpression::notToken, and out.

+ Here is the call graph for this function:

◆ visit() [50/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::NullExpression * ast)
overrideprotected

Definition at line 69 of file qqmldomreformatter.cpp.

References QQmlJS::AST::NullExpression::nullToken, and out.

◆ visit() [51/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::NumericLiteral * ast)
overrideprotected

Definition at line 106 of file qqmldomreformatter.cpp.

References QQmlJS::AST::NumericLiteral::literalToken, and out.

◆ visit() [52/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::NumericLiteralPropertyName * ast)
overrideprotected

Definition at line 271 of file qqmldomreformatter.cpp.

References QQmlJS::AST::NumericLiteralPropertyName::id, QString::number(), and out.

+ Here is the call graph for this function:

◆ visit() [53/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ObjectPattern * ast)
overrideprotected

Definition at line 136 of file qqmldomreformatter.cpp.

References QQmlJS::AST::ObjectPattern::lbraceToken, lnAcceptIndented(), newLine(), out, QQmlJS::AST::ObjectPattern::properties, and QQmlJS::AST::ObjectPattern::rbraceToken.

+ Here is the call graph for this function:

◆ visit() [54/82]

◆ visit() [55/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::PatternElementList * ast)
overrideprotected

Definition at line 149 of file qqmldomreformatter.cpp.

References accept(), it, newLine(), and out.

+ Here is the call graph for this function:

◆ visit() [56/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::PatternProperty * property)
overrideprotected

Definition at line 185 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::Dom::OutWriter::decreaseIndent(), QQmlJS::AST::PatternElement::Getter, QQmlJS::Dom::OutWriter::increaseIndent(), lnAcceptIndented(), QQmlJS::AST::PatternElement::Method, QQmlJS::Dom::OutWriter::newline(), out, property, and QQmlJS::AST::PatternElement::Setter.

+ Here is the call graph for this function:

◆ visit() [57/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::PatternPropertyList * ast)
overrideprotected

Definition at line 172 of file qqmldomreformatter.cpp.

References accept(), it, newLine(), and out.

+ Here is the call graph for this function:

◆ visit() [58/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::PostDecrementExpression * ast)
overrideprotected

Definition at line 347 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::PostDecrementExpression::base, QQmlJS::AST::PostDecrementExpression::decrementToken, and out.

+ Here is the call graph for this function:

◆ visit() [59/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::PostIncrementExpression * ast)
overrideprotected

Definition at line 340 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::PostIncrementExpression::base, QQmlJS::AST::PostIncrementExpression::incrementToken, and out.

+ Here is the call graph for this function:

◆ visit() [60/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::PreDecrementExpression * ast)
overrideprotected

Definition at line 361 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::PreDecrementExpression::decrementToken, QQmlJS::AST::PreDecrementExpression::expression, and out.

+ Here is the call graph for this function:

◆ visit() [61/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::PreIncrementExpression * ast)
overrideprotected

Definition at line 354 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::PreIncrementExpression::expression, QQmlJS::AST::PreIncrementExpression::incrementToken, and out.

+ Here is the call graph for this function:

◆ visit() [62/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::RegExpLiteral * ast)
overrideprotected

Definition at line 111 of file qqmldomreformatter.cpp.

References QQmlJS::AST::RegExpLiteral::literalToken, and out.

◆ visit() [63/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ReturnStatement * ast)
overrideprotected

Definition at line 608 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::ReturnStatement::expression, QQmlJS::SourceLocation::length, out, and QQmlJS::AST::ReturnStatement::returnToken.

+ Here is the call graph for this function:

◆ visit() [64/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::StatementList * ast)
overrideprotected

Definition at line 808 of file qqmldomreformatter.cpp.

References accept(), it, and newLine().

+ Here is the call graph for this function:

◆ visit() [65/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::StringLiteral * ast)
overrideprotected

Definition at line 90 of file qqmldomreformatter.cpp.

References QString::contains(), QQmlJS::Dom::OutWriter::indentNextlines, QQmlJS::SourceLocation::length, QQmlJS::AST::StringLiteral::literalToken, QString::mid(), out, and str.

+ Here is the call graph for this function:

◆ visit() [66/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::StringLiteralPropertyName * ast)
overrideprotected

Definition at line 266 of file qqmldomreformatter.cpp.

References out, and QQmlJS::AST::PropertyName::propertyNameToken.

◆ visit() [67/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::SuperLiteral * )
overrideprotected

Definition at line 880 of file qqmldomreformatter.cpp.

References out.

◆ visit() [68/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::SwitchStatement * ast)
overrideprotected

Definition at line 644 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::SwitchStatement::block, QQmlJS::AST::SwitchStatement::expression, QQmlJS::AST::SwitchStatement::lparenToken, out, QQmlJS::AST::SwitchStatement::rparenToken, and QQmlJS::AST::SwitchStatement::switchToken.

+ Here is the call graph for this function:

◆ visit() [69/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::TemplateLiteral * ast)
overrideprotected

Definition at line 277 of file qqmldomreformatter.cpp.

References accept(), QString::contains(), QQmlJS::AST::TemplateLiteral::expression, QQmlJS::Dom::OutWriter::indentNextlines, QQmlJS::SourceLocation::length, QQmlJS::AST::TemplateLiteral::literalToken, QString::mid(), out, and str.

+ Here is the call graph for this function:

◆ visit() [70/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ThisExpression * ast)
overrideprotected

Definition at line 63 of file qqmldomreformatter.cpp.

References out, and QQmlJS::AST::ThisExpression::thisToken.

Referenced by visit().

+ Here is the caller graph for this function:

◆ visit() [71/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::ThrowStatement * ast)
overrideprotected

Definition at line 621 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::ThrowStatement::expression, out, and QQmlJS::AST::ThrowStatement::throwToken.

+ Here is the call graph for this function:

◆ visit() [72/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::TildeExpression * ast)
overrideprotected

Definition at line 403 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::TildeExpression::expression, out, and QQmlJS::AST::TildeExpression::tildeToken.

+ Here is the call graph for this function:

◆ visit() [73/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::TrueLiteral * ast)
overrideprotected

Definition at line 74 of file qqmldomreformatter.cpp.

References out, and QQmlJS::AST::TrueLiteral::trueToken.

◆ visit() [74/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::TryStatement * ast)
overrideprotected

Definition at line 700 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::TryStatement::catchExpression, QQmlJS::AST::TryStatement::finallyExpression, out, and QQmlJS::AST::TryStatement::statement.

+ Here is the call graph for this function:

◆ visit() [75/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::TypeOfExpression * ast)
overrideprotected

Definition at line 382 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::TypeOfExpression::expression, and out.

+ Here is the call graph for this function:

◆ visit() [76/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::UnaryMinusExpression * ast)
overrideprotected

Definition at line 396 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::UnaryMinusExpression::expression, QQmlJS::AST::UnaryMinusExpression::minusToken, and out.

+ Here is the call graph for this function:

◆ visit() [77/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::UnaryPlusExpression * ast)
overrideprotected

Definition at line 389 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::UnaryPlusExpression::expression, out, and QQmlJS::AST::UnaryPlusExpression::plusToken.

+ Here is the call graph for this function:

◆ visit() [78/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::VariableDeclarationList * ast)
overrideprotected

Definition at line 845 of file qqmldomreformatter.cpp.

References accept(), it, and out.

+ Here is the call graph for this function:

◆ visit() [79/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::VariableStatement * ast)
overrideprotected

Definition at line 450 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::VariableStatement::declarationKindToken, QQmlJS::AST::VariableStatement::declarations, and out.

+ Here is the call graph for this function:

◆ visit() [80/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::VoidExpression * ast)
overrideprotected

Definition at line 375 of file qqmldomreformatter.cpp.

References accept(), QQmlJS::AST::VoidExpression::expression, and out.

+ Here is the call graph for this function:

◆ visit() [81/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::WhileStatement * ast)
overrideprotected

Definition at line 529 of file qqmldomreformatter.cpp.

References accept(), acceptBlockOrIndented(), QQmlJS::AST::WhileStatement::expression, QQmlJS::AST::WhileStatement::lparenToken, out, QQmlJS::AST::WhileStatement::rparenToken, QQmlJS::AST::WhileStatement::statement, and QQmlJS::AST::WhileStatement::whileToken.

+ Here is the call graph for this function:

◆ visit() [82/82]

bool QQmlJS::Dom::ScriptFormatter::visit ( AST::WithStatement * ast)
overrideprotected

Definition at line 633 of file qqmldomreformatter.cpp.

References accept(), acceptBlockOrIndented(), QQmlJS::AST::WithStatement::expression, QQmlJS::AST::WithStatement::lparenToken, out, QQmlJS::AST::WithStatement::rparenToken, QQmlJS::AST::WithStatement::statement, and QQmlJS::AST::WithStatement::withToken.

+ Here is the call graph for this function:

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