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::AST::PatternElement Class Reference

#include <qqmljsast_p.h>

Inheritance diagram for QQmlJS::AST::PatternElement:
Collaboration diagram for QQmlJS::AST::PatternElement:

Public Types

enum  Type {
  Literal , Method , Getter , Setter ,
  SpreadElement , RestElement = SpreadElement , Binding
}
Public Types inherited from QQmlJS::AST::Node
enum  Kind {
  Kind_Undefined , Kind_ArgumentList , Kind_ArrayPattern , Kind_ArrayMemberExpression ,
  Kind_BinaryExpression , Kind_Block , Kind_BreakStatement , Kind_CallExpression ,
  Kind_CaseBlock , Kind_CaseClause , Kind_CaseClauses , Kind_Catch ,
  Kind_ConditionalExpression , Kind_ContinueStatement , Kind_DebuggerStatement , Kind_DefaultClause ,
  Kind_DeleteExpression , Kind_DoWhileStatement , Kind_Elision , Kind_EmptyStatement ,
  Kind_CommaExpression , Kind_ExpressionStatement , Kind_FalseLiteral , Kind_SuperLiteral ,
  Kind_FieldMemberExpression , Kind_Finally , Kind_ForEachStatement , Kind_ForStatement ,
  Kind_FormalParameterList , Kind_FunctionDeclaration , Kind_FunctionExpression , Kind_ClassExpression ,
  Kind_ClassDeclaration , Kind_IdentifierExpression , Kind_IdentifierPropertyName , Kind_InitializerExpression ,
  Kind_ComputedPropertyName , Kind_IfStatement , Kind_LabelledStatement , Kind_NameSpaceImport ,
  Kind_ImportSpecifier , Kind_ImportsList , Kind_NamedImports , Kind_ImportClause ,
  Kind_FromClause , Kind_ImportDeclaration , Kind_ESModule , Kind_ExportSpecifier ,
  Kind_ExportsList , Kind_ExportClause , Kind_ExportDeclaration , Kind_NewExpression ,
  Kind_NewMemberExpression , Kind_NotExpression , Kind_NullExpression , Kind_YieldExpression ,
  Kind_NumericLiteral , Kind_NumericLiteralPropertyName , Kind_ObjectPattern , Kind_PostDecrementExpression ,
  Kind_PostIncrementExpression , Kind_PreDecrementExpression , Kind_PreIncrementExpression , Kind_Program ,
  Kind_PropertyName , Kind_RegExpLiteral , Kind_ReturnStatement , Kind_StatementList ,
  Kind_StringLiteral , Kind_StringLiteralPropertyName , Kind_SwitchStatement , Kind_TemplateLiteral ,
  Kind_TaggedTemplate , Kind_TypeExpression , Kind_ThisExpression , Kind_ThrowStatement ,
  Kind_TildeExpression , Kind_TrueLiteral , Kind_TryStatement , Kind_TypeOfExpression ,
  Kind_UnaryMinusExpression , Kind_UnaryPlusExpression , Kind_VariableDeclaration , Kind_VariableDeclarationList ,
  Kind_VariableStatement , Kind_VoidExpression , Kind_WhileStatement , Kind_WithStatement ,
  Kind_NestedExpression , Kind_ClassElementList , Kind_PatternElement , Kind_PatternElementList ,
  Kind_PatternProperty , Kind_PatternPropertyList , Kind_Type , Kind_TypeAnnotation ,
  Kind_UiArrayBinding , Kind_UiImport , Kind_UiObjectBinding , Kind_UiObjectDefinition ,
  Kind_UiInlineComponent , Kind_UiObjectInitializer , Kind_UiObjectMemberList , Kind_UiArrayMemberList ,
  Kind_UiPragmaValueList , Kind_UiPragma , Kind_UiProgram , Kind_UiParameterList ,
  Kind_UiPropertyAttributes , Kind_UiPublicMember , Kind_UiQualifiedId , Kind_UiScriptBinding ,
  Kind_UiSourceElement , Kind_UiHeaderItemList , Kind_UiEnumDeclaration , Kind_UiEnumMemberList ,
  Kind_UiVersionSpecifier , Kind_UiRequired , Kind_UiAnnotation , Kind_UiAnnotationList
}

Public Member Functions

 PatternElement (ExpressionNode *i=nullptr, Type t=Literal)
 PatternElement (QStringView n, TypeAnnotation *typeAnnotation=nullptr, ExpressionNode *i=nullptr, Type t=Binding)
 PatternElement (Pattern *pattern, ExpressionNode *i=nullptr, Type t=Binding)
void accept0 (BaseVisitor *visitor) override
virtual bool convertLiteralToAssignmentPattern (SourceLocation *errorLocation, QString *errorMessage)
virtual QList< DiagnosticMessage > warningsForAssignments () const
SourceLocation firstSourceLocation () const override
SourceLocation lastSourceLocation () const override
ExpressionNode * destructuringTarget () const
Pattern * destructuringPattern () const
PatternElementList * elementList () const
PatternPropertyList * propertyList () const
bool isVariableDeclaration () const
bool isLexicallyScoped () const
virtual void boundNames (BoundNames *names)
Public Member Functions inherited from QQmlJS::AST::Node
 Node ()
virtual ~Node ()
virtual ExpressionNode * expressionCast ()
virtual BinaryExpression * binaryExpressionCast ()
virtual Statement * statementCast ()
virtual UiObjectMember * uiObjectMemberCast ()
virtual LeftHandSideExpression * leftHandSideExpressionCast ()
virtual Pattern * patternCast ()
virtual FunctionExpression * asFunctionDefinition ()
virtual ClassExpression * asClassDefinition ()
bool ignoreRecursionDepth () const
void accept (BaseVisitor *visitor)
Public Member Functions inherited from QQmlJS::Managed
 Managed ()=default
 ~Managed ()=default
void * operator new (size_t size, MemoryPool *pool)
void operator delete (void *)
void operator delete (void *, MemoryPool *)

Public Attributes

SourceLocation identifierToken
SourceLocation equalToken
QStringView bindingIdentifier
ExpressionNode * bindingTarget = nullptr
ExpressionNode * initializer = nullptr
Type type = Literal
TypeAnnotation * typeAnnotation = nullptr
SourceLocation declarationKindToken
VariableScope scope = VariableScope::NoScope
bool isForDeclaration = false
bool isInjectedSignalParameter = false
Public Attributes inherited from QQmlJS::AST::Node
int kind = Kind_Undefined

Additional Inherited Members

Static Public Member Functions inherited from QQmlJS::AST::Node
static void accept (Node *node, BaseVisitor *visitor)

Detailed Description

Definition at line 913 of file qqmljsast_p.h.

Member Enumeration Documentation

◆ Type

Enumerator
Literal 
Method 
Getter 
Setter 
SpreadElement 
RestElement 
Binding 

Definition at line 918 of file qqmljsast_p.h.

Constructor & Destructor Documentation

◆ PatternElement() [1/3]

QQmlJS::AST::PatternElement::PatternElement ( ExpressionNode * i = nullptr,
Type t = Literal )
inline

Definition at line 949 of file qqmljsast_p.h.

◆ PatternElement() [2/3]

QQmlJS::AST::PatternElement::PatternElement ( QStringView n,
TypeAnnotation * typeAnnotation = nullptr,
ExpressionNode * i = nullptr,
Type t = Binding )
inline

Definition at line 956 of file qqmljsast_p.h.

◆ PatternElement() [3/3]

QQmlJS::AST::PatternElement::PatternElement ( Pattern * pattern,
ExpressionNode * i = nullptr,
Type t = Binding )
inline

Definition at line 965 of file qqmljsast_p.h.

Member Function Documentation

◆ accept0()

void QQmlJS::AST::PatternElement::accept0 ( BaseVisitor * visitor)
overridevirtual

Implements QQmlJS::AST::Node.

Reimplemented in QQmlJS::AST::PatternProperty.

Definition at line 1466 of file qqmljsast.cpp.

◆ boundNames()

void QQmlJS::AST::PatternElement::boundNames ( BoundNames * names)
virtual

Reimplemented in QQmlJS::AST::PatternProperty.

Definition at line 1477 of file qqmljsast.cpp.

◆ convertLiteralToAssignmentPattern()

bool QQmlJS::AST::PatternElement::convertLiteralToAssignmentPattern ( SourceLocation * errorLocation,
QString * errorMessage )
virtual

Reimplemented in QQmlJS::AST::PatternProperty.

Definition at line 433 of file qqmljsast.cpp.

◆ destructuringPattern()

Pattern * QQmlJS::AST::PatternElement::destructuringPattern ( ) const
inline

Definition at line 984 of file qqmljsast_p.h.

◆ destructuringTarget()

ExpressionNode * QQmlJS::AST::PatternElement::destructuringTarget ( ) const
inline

Definition at line 983 of file qqmljsast_p.h.

◆ elementList()

PatternElementList * QQmlJS::AST::PatternElement::elementList ( ) const
inline

Definition at line 985 of file qqmljsast_p.h.

◆ firstSourceLocation()

SourceLocation QQmlJS::AST::PatternElement::firstSourceLocation ( ) const
inlineoverridevirtual

Implements QQmlJS::AST::Node.

Reimplemented in QQmlJS::AST::PatternProperty.

Definition at line 977 of file qqmljsast_p.h.

◆ isLexicallyScoped()

bool QQmlJS::AST::PatternElement::isLexicallyScoped ( ) const
inline

Definition at line 989 of file qqmljsast_p.h.

◆ isVariableDeclaration()

bool QQmlJS::AST::PatternElement::isVariableDeclaration ( ) const
inline

Definition at line 988 of file qqmljsast_p.h.

◆ lastSourceLocation()

SourceLocation QQmlJS::AST::PatternElement::lastSourceLocation ( ) const
inlineoverridevirtual

Implements QQmlJS::AST::Node.

Reimplemented in QQmlJS::AST::PatternProperty.

Definition at line 980 of file qqmljsast_p.h.

◆ propertyList()

PatternPropertyList * QQmlJS::AST::PatternElement::propertyList ( ) const
inline

Definition at line 986 of file qqmljsast_p.h.

◆ warningsForAssignments()

QList< DiagnosticMessage > QQmlJS::AST::PatternElement::warningsForAssignments ( ) const
virtual

Reimplemented in QQmlJS::AST::PatternProperty.

Definition at line 486 of file qqmljsast.cpp.

Member Data Documentation

◆ bindingIdentifier

QStringView QQmlJS::AST::PatternElement::bindingIdentifier

Definition at line 996 of file qqmljsast_p.h.

◆ bindingTarget

ExpressionNode* QQmlJS::AST::PatternElement::bindingTarget = nullptr

Definition at line 997 of file qqmljsast_p.h.

◆ declarationKindToken

SourceLocation QQmlJS::AST::PatternElement::declarationKindToken

Definition at line 1002 of file qqmljsast_p.h.

◆ equalToken

SourceLocation QQmlJS::AST::PatternElement::equalToken

Definition at line 995 of file qqmljsast_p.h.

◆ identifierToken

SourceLocation QQmlJS::AST::PatternElement::identifierToken

Definition at line 994 of file qqmljsast_p.h.

◆ initializer

ExpressionNode* QQmlJS::AST::PatternElement::initializer = nullptr

Definition at line 998 of file qqmljsast_p.h.

◆ isForDeclaration

bool QQmlJS::AST::PatternElement::isForDeclaration = false

Definition at line 1004 of file qqmljsast_p.h.

◆ isInjectedSignalParameter

bool QQmlJS::AST::PatternElement::isInjectedSignalParameter = false

Definition at line 1005 of file qqmljsast_p.h.

◆ scope

VariableScope QQmlJS::AST::PatternElement::scope = VariableScope::NoScope

Definition at line 1003 of file qqmljsast_p.h.

◆ type

Type QQmlJS::AST::PatternElement::type = Literal

Definition at line 999 of file qqmljsast_p.h.

◆ typeAnnotation

TypeAnnotation* QQmlJS::AST::PatternElement::typeAnnotation = nullptr

Definition at line 1000 of file qqmljsast_p.h.


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