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
GLSL::AST Class Referenceabstract

#include <glslast_p.h>

+ Inheritance diagram for GLSL::AST:
+ Collaboration diagram for GLSL::AST:

Public Types

enum  Kind {
  Kind_Undefined , Kind_TranslationUnit , Kind_Identifier , Kind_Literal ,
  Kind_PreIncrement , Kind_PostIncrement , Kind_PreDecrement , Kind_PostDecrement ,
  Kind_UnaryPlus , Kind_UnaryMinus , Kind_LogicalNot , Kind_BitwiseNot ,
  Kind_Plus , Kind_Minus , Kind_Multiply , Kind_Divide ,
  Kind_Modulus , Kind_ShiftLeft , Kind_ShiftRight , Kind_Equal ,
  Kind_NotEqual , Kind_LessThan , Kind_LessEqual , Kind_GreaterThan ,
  Kind_GreaterEqual , Kind_LogicalAnd , Kind_LogicalOr , Kind_LogicalXor ,
  Kind_BitwiseAnd , Kind_BitwiseOr , Kind_BitwiseXor , Kind_Comma ,
  Kind_ArrayAccess , Kind_Conditional , Kind_MemberAccess , Kind_FunctionCall ,
  Kind_MemberFunctionCall , Kind_FunctionIdentifier , Kind_DeclarationExpression , Kind_Assign ,
  Kind_AssignPlus , Kind_AssignMinus , Kind_AssignMultiply , Kind_AssignDivide ,
  Kind_AssignModulus , Kind_AssignShiftLeft , Kind_AssignShiftRight , Kind_AssignAnd ,
  Kind_AssignOr , Kind_AssignXor , Kind_ExpressionStatement , Kind_CompoundStatement ,
  Kind_If , Kind_While , Kind_Do , Kind_For ,
  Kind_Break , Kind_Continue , Kind_Discard , Kind_Return ,
  Kind_ReturnExpression , Kind_Switch , Kind_CaseLabel , Kind_DefaultLabel ,
  Kind_DeclarationStatement , Kind_BasicType , Kind_NamedType , Kind_ArrayType ,
  Kind_OpenArrayType , Kind_StructType , Kind_AnonymousStructType , Kind_StructField ,
  Kind_LayoutQualifier , Kind_QualifiedType , Kind_PrecisionDeclaration , Kind_ParameterDeclaration ,
  Kind_VariableDeclaration , Kind_TypeDeclaration , Kind_TypeAndVariableDeclaration , Kind_InvariantDeclaration ,
  Kind_InitDeclaration , Kind_FunctionDeclaration
}
 

Public Member Functions

virtual TranslationUnitASTasTranslationUnit ()
 
virtual ExpressionASTasExpression ()
 
virtual IdentifierExpressionASTasIdentifierExpression ()
 
virtual LiteralExpressionASTasLiteralExpression ()
 
virtual BinaryExpressionASTasBinaryExpression ()
 
virtual UnaryExpressionASTasUnaryExpression ()
 
virtual TernaryExpressionASTasTernaryExpression ()
 
virtual AssignmentExpressionASTasAssignmentExpression ()
 
virtual MemberAccessExpressionASTasMemberAccessExpression ()
 
virtual FunctionCallExpressionASTasFunctionCallExpression ()
 
virtual FunctionIdentifierASTasFunctionIdentifier ()
 
virtual DeclarationExpressionASTasDeclarationExpression ()
 
virtual StatementASTasStatement ()
 
virtual ExpressionStatementASTasExpressionStatement ()
 
virtual CompoundStatementASTasCompoundStatement ()
 
virtual IfStatementASTasIfStatement ()
 
virtual WhileStatementASTasWhileStatement ()
 
virtual DoStatementASTasDoStatement ()
 
virtual ForStatementASTasForStatement ()
 
virtual JumpStatementASTasJumpStatement ()
 
virtual ReturnStatementASTasReturnStatement ()
 
virtual SwitchStatementASTasSwitchStatement ()
 
virtual CaseLabelStatementASTasCaseLabelStatement ()
 
virtual DeclarationStatementASTasDeclarationStatement ()
 
virtual TypeASTasType ()
 
virtual BasicTypeASTasBasicType ()
 
virtual NamedTypeASTasNamedType ()
 
virtual ArrayTypeASTasArrayType ()
 
virtual StructTypeASTasStructType ()
 
virtual QualifiedTypeASTasQualifiedType ()
 
virtual LayoutQualifierASTasLayoutQualifier ()
 
virtual DeclarationASTasDeclaration ()
 
virtual PrecisionDeclarationASTasPrecisionDeclaration ()
 
virtual ParameterDeclarationASTasParameterDeclaration ()
 
virtual VariableDeclarationASTasVariableDeclaration ()
 
virtual TypeDeclarationASTasTypeDeclaration ()
 
virtual TypeAndVariableDeclarationASTasTypeAndVariableDeclaration ()
 
virtual InvariantDeclarationASTasInvariantDeclaration ()
 
virtual InitDeclarationASTasInitDeclaration ()
 
virtual FunctionDeclarationASTasFunctionDeclaration ()
 
void accept (Visitor *visitor)
 
virtual void accept0 (Visitor *visitor)=0
 
- Public Member Functions inherited from GLSL::Managed
 Managed ()
 
virtual ~Managed ()
 
voidoperator new (size_t size, MemoryPool *pool)
 
void operator delete (void *)
 
void operator delete (void *, MemoryPool *)
 

Static Public Member Functions

static void accept (AST *ast, Visitor *visitor)
 
template<typename T >
static void accept (List< T > *it, Visitor *visitor)
 

Public Attributes

int kind
 
int lineno
 

Protected Member Functions

 AST (Kind _kind)
 
 ~AST () override
 

Static Protected Member Functions

template<typename T >
static List< T > * finish (List< T > *list)
 

Detailed Description

Definition at line 110 of file glslast_p.h.

Member Enumeration Documentation

◆ Kind

Enumerator
Kind_Undefined 
Kind_TranslationUnit 
Kind_Identifier 
Kind_Literal 
Kind_PreIncrement 
Kind_PostIncrement 
Kind_PreDecrement 
Kind_PostDecrement 
Kind_UnaryPlus 
Kind_UnaryMinus 
Kind_LogicalNot 
Kind_BitwiseNot 
Kind_Plus 
Kind_Minus 
Kind_Multiply 
Kind_Divide 
Kind_Modulus 
Kind_ShiftLeft 
Kind_ShiftRight 
Kind_Equal 
Kind_NotEqual 
Kind_LessThan 
Kind_LessEqual 
Kind_GreaterThan 
Kind_GreaterEqual 
Kind_LogicalAnd 
Kind_LogicalOr 
Kind_LogicalXor 
Kind_BitwiseAnd 
Kind_BitwiseOr 
Kind_BitwiseXor 
Kind_Comma 
Kind_ArrayAccess 
Kind_Conditional 
Kind_MemberAccess 
Kind_FunctionCall 
Kind_MemberFunctionCall 
Kind_FunctionIdentifier 
Kind_DeclarationExpression 
Kind_Assign 
Kind_AssignPlus 
Kind_AssignMinus 
Kind_AssignMultiply 
Kind_AssignDivide 
Kind_AssignModulus 
Kind_AssignShiftLeft 
Kind_AssignShiftRight 
Kind_AssignAnd 
Kind_AssignOr 
Kind_AssignXor 
Kind_ExpressionStatement 
Kind_CompoundStatement 
Kind_If 
Kind_While 
Kind_Do 
Kind_For 
Kind_Break 
Kind_Continue 
Kind_Discard 
Kind_Return 
Kind_ReturnExpression 
Kind_Switch 
Kind_CaseLabel 
Kind_DefaultLabel 
Kind_DeclarationStatement 
Kind_BasicType 
Kind_NamedType 
Kind_ArrayType 
Kind_OpenArrayType 
Kind_StructType 
Kind_AnonymousStructType 
Kind_StructField 
Kind_LayoutQualifier 
Kind_QualifiedType 
Kind_PrecisionDeclaration 
Kind_ParameterDeclaration 
Kind_VariableDeclaration 
Kind_TypeDeclaration 
Kind_TypeAndVariableDeclaration 
Kind_InvariantDeclaration 
Kind_InitDeclaration 
Kind_FunctionDeclaration 

Definition at line 113 of file glslast_p.h.

Constructor & Destructor Documentation

◆ AST()

GLSL::AST::AST ( Kind _kind)
inlineprotected

Definition at line 274 of file glslast_p.h.

◆ ~AST()

GLSL::AST::~AST ( )
inlineoverrideprotected

Definition at line 289 of file glslast_p.h.

Member Function Documentation

◆ accept() [1/3]

void AST::accept ( AST * ast,
Visitor * visitor )
static

Definition at line 19 of file glslast.cpp.

References accept().

+ Here is the call graph for this function:

◆ accept() [2/3]

template<typename T >
static void GLSL::AST::accept ( List< T > * it,
Visitor * visitor )
inlinestatic

Definition at line 265 of file glslast_p.h.

References it.

◆ accept() [3/3]

void AST::accept ( Visitor * visitor)

Definition at line 12 of file glslast.cpp.

References accept0(), GLSL::Visitor::postVisit(), and GLSL::Visitor::preVisit().

Referenced by GLSL::Visitor::accept(), accept(), GLSL::TranslationUnitAST::accept0(), GLSL::BinaryExpressionAST::accept0(), GLSL::UnaryExpressionAST::accept0(), GLSL::TernaryExpressionAST::accept0(), GLSL::AssignmentExpressionAST::accept0(), GLSL::MemberAccessExpressionAST::accept0(), GLSL::FunctionCallExpressionAST::accept0(), GLSL::FunctionIdentifierAST::accept0(), GLSL::DeclarationExpressionAST::accept0(), GLSL::ExpressionStatementAST::accept0(), GLSL::CompoundStatementAST::accept0(), GLSL::IfStatementAST::accept0(), GLSL::WhileStatementAST::accept0(), GLSL::DoStatementAST::accept0(), GLSL::ForStatementAST::accept0(), GLSL::ReturnStatementAST::accept0(), GLSL::SwitchStatementAST::accept0(), GLSL::CaseLabelStatementAST::accept0(), GLSL::DeclarationStatementAST::accept0(), GLSL::ArrayTypeAST::accept0(), GLSL::StructTypeAST::Field::accept0(), GLSL::StructTypeAST::accept0(), GLSL::QualifiedTypeAST::accept0(), GLSL::PrecisionDeclarationAST::accept0(), GLSL::ParameterDeclarationAST::accept0(), GLSL::VariableDeclarationAST::accept0(), GLSL::TypeDeclarationAST::accept0(), GLSL::TypeAndVariableDeclarationAST::accept0(), GLSL::InitDeclarationAST::accept0(), and GLSL::FunctionDeclarationAST::accept0().

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

◆ accept0()

◆ asArrayType()

virtual ArrayTypeAST * GLSL::AST::asArrayType ( )
inlinevirtual

Reimplemented in GLSL::ArrayTypeAST.

Definition at line 246 of file glslast_p.h.

◆ asAssignmentExpression()

virtual AssignmentExpressionAST * GLSL::AST::asAssignmentExpression ( )
inlinevirtual

Reimplemented in GLSL::AssignmentExpressionAST.

Definition at line 224 of file glslast_p.h.

◆ asBasicType()

virtual BasicTypeAST * GLSL::AST::asBasicType ( )
inlinevirtual

Reimplemented in GLSL::BasicTypeAST.

Definition at line 244 of file glslast_p.h.

◆ asBinaryExpression()

virtual BinaryExpressionAST * GLSL::AST::asBinaryExpression ( )
inlinevirtual

Reimplemented in GLSL::BinaryExpressionAST.

Definition at line 221 of file glslast_p.h.

◆ asCaseLabelStatement()

virtual CaseLabelStatementAST * GLSL::AST::asCaseLabelStatement ( )
inlinevirtual

Reimplemented in GLSL::CaseLabelStatementAST.

Definition at line 240 of file glslast_p.h.

◆ asCompoundStatement()

virtual CompoundStatementAST * GLSL::AST::asCompoundStatement ( )
inlinevirtual

Reimplemented in GLSL::CompoundStatementAST.

Definition at line 232 of file glslast_p.h.

◆ asDeclaration()

virtual DeclarationAST * GLSL::AST::asDeclaration ( )
inlinevirtual

Reimplemented in GLSL::DeclarationAST.

Definition at line 251 of file glslast_p.h.

◆ asDeclarationExpression()

virtual DeclarationExpressionAST * GLSL::AST::asDeclarationExpression ( )
inlinevirtual

Reimplemented in GLSL::DeclarationExpressionAST.

Definition at line 228 of file glslast_p.h.

◆ asDeclarationStatement()

virtual DeclarationStatementAST * GLSL::AST::asDeclarationStatement ( )
inlinevirtual

Reimplemented in GLSL::DeclarationStatementAST.

Definition at line 241 of file glslast_p.h.

◆ asDoStatement()

virtual DoStatementAST * GLSL::AST::asDoStatement ( )
inlinevirtual

Reimplemented in GLSL::DoStatementAST.

Definition at line 235 of file glslast_p.h.

◆ asExpression()

virtual ExpressionAST * GLSL::AST::asExpression ( )
inlinevirtual

Reimplemented in GLSL::ExpressionAST.

Definition at line 218 of file glslast_p.h.

◆ asExpressionStatement()

virtual ExpressionStatementAST * GLSL::AST::asExpressionStatement ( )
inlinevirtual

Reimplemented in GLSL::ExpressionStatementAST.

Definition at line 231 of file glslast_p.h.

◆ asForStatement()

virtual ForStatementAST * GLSL::AST::asForStatement ( )
inlinevirtual

Reimplemented in GLSL::ForStatementAST.

Definition at line 236 of file glslast_p.h.

◆ asFunctionCallExpression()

virtual FunctionCallExpressionAST * GLSL::AST::asFunctionCallExpression ( )
inlinevirtual

Reimplemented in GLSL::FunctionCallExpressionAST.

Definition at line 226 of file glslast_p.h.

◆ asFunctionDeclaration()

virtual FunctionDeclarationAST * GLSL::AST::asFunctionDeclaration ( )
inlinevirtual

Reimplemented in GLSL::FunctionDeclarationAST.

Definition at line 259 of file glslast_p.h.

◆ asFunctionIdentifier()

virtual FunctionIdentifierAST * GLSL::AST::asFunctionIdentifier ( )
inlinevirtual

Reimplemented in GLSL::FunctionIdentifierAST.

Definition at line 227 of file glslast_p.h.

◆ asIdentifierExpression()

virtual IdentifierExpressionAST * GLSL::AST::asIdentifierExpression ( )
inlinevirtual

Reimplemented in GLSL::IdentifierExpressionAST.

Definition at line 219 of file glslast_p.h.

◆ asIfStatement()

virtual IfStatementAST * GLSL::AST::asIfStatement ( )
inlinevirtual

Reimplemented in GLSL::IfStatementAST.

Definition at line 233 of file glslast_p.h.

◆ asInitDeclaration()

virtual InitDeclarationAST * GLSL::AST::asInitDeclaration ( )
inlinevirtual

Reimplemented in GLSL::InitDeclarationAST.

Definition at line 258 of file glslast_p.h.

◆ asInvariantDeclaration()

virtual InvariantDeclarationAST * GLSL::AST::asInvariantDeclaration ( )
inlinevirtual

Reimplemented in GLSL::InvariantDeclarationAST.

Definition at line 257 of file glslast_p.h.

◆ asJumpStatement()

virtual JumpStatementAST * GLSL::AST::asJumpStatement ( )
inlinevirtual

Reimplemented in GLSL::JumpStatementAST.

Definition at line 237 of file glslast_p.h.

◆ asLayoutQualifier()

virtual LayoutQualifierAST * GLSL::AST::asLayoutQualifier ( )
inlinevirtual

Reimplemented in GLSL::LayoutQualifierAST.

Definition at line 249 of file glslast_p.h.

◆ asLiteralExpression()

virtual LiteralExpressionAST * GLSL::AST::asLiteralExpression ( )
inlinevirtual

Reimplemented in GLSL::LiteralExpressionAST.

Definition at line 220 of file glslast_p.h.

◆ asMemberAccessExpression()

virtual MemberAccessExpressionAST * GLSL::AST::asMemberAccessExpression ( )
inlinevirtual

Reimplemented in GLSL::MemberAccessExpressionAST.

Definition at line 225 of file glslast_p.h.

◆ asNamedType()

virtual NamedTypeAST * GLSL::AST::asNamedType ( )
inlinevirtual

Reimplemented in GLSL::NamedTypeAST.

Definition at line 245 of file glslast_p.h.

◆ asParameterDeclaration()

virtual ParameterDeclarationAST * GLSL::AST::asParameterDeclaration ( )
inlinevirtual

Reimplemented in GLSL::ParameterDeclarationAST.

Definition at line 253 of file glslast_p.h.

◆ asPrecisionDeclaration()

virtual PrecisionDeclarationAST * GLSL::AST::asPrecisionDeclaration ( )
inlinevirtual

Reimplemented in GLSL::PrecisionDeclarationAST.

Definition at line 252 of file glslast_p.h.

◆ asQualifiedType()

virtual QualifiedTypeAST * GLSL::AST::asQualifiedType ( )
inlinevirtual

Reimplemented in GLSL::QualifiedTypeAST.

Definition at line 248 of file glslast_p.h.

Referenced by GLSL::Semantic::visit().

+ Here is the caller graph for this function:

◆ asReturnStatement()

virtual ReturnStatementAST * GLSL::AST::asReturnStatement ( )
inlinevirtual

Reimplemented in GLSL::ReturnStatementAST.

Definition at line 238 of file glslast_p.h.

◆ asStatement()

virtual StatementAST * GLSL::AST::asStatement ( )
inlinevirtual

Reimplemented in GLSL::StatementAST.

Definition at line 230 of file glslast_p.h.

◆ asStructType()

virtual StructTypeAST * GLSL::AST::asStructType ( )
inlinevirtual

Reimplemented in GLSL::StructTypeAST.

Definition at line 247 of file glslast_p.h.

◆ asSwitchStatement()

virtual SwitchStatementAST * GLSL::AST::asSwitchStatement ( )
inlinevirtual

Reimplemented in GLSL::SwitchStatementAST.

Definition at line 239 of file glslast_p.h.

◆ asTernaryExpression()

virtual TernaryExpressionAST * GLSL::AST::asTernaryExpression ( )
inlinevirtual

Reimplemented in GLSL::TernaryExpressionAST.

Definition at line 223 of file glslast_p.h.

◆ asTranslationUnit()

virtual TranslationUnitAST * GLSL::AST::asTranslationUnit ( )
inlinevirtual

Reimplemented in GLSL::TranslationUnitAST.

Definition at line 216 of file glslast_p.h.

◆ asType()

virtual TypeAST * GLSL::AST::asType ( )
inlinevirtual

Reimplemented in GLSL::TypeAST.

Definition at line 243 of file glslast_p.h.

◆ asTypeAndVariableDeclaration()

virtual TypeAndVariableDeclarationAST * GLSL::AST::asTypeAndVariableDeclaration ( )
inlinevirtual

Reimplemented in GLSL::TypeAndVariableDeclarationAST.

Definition at line 256 of file glslast_p.h.

◆ asTypeDeclaration()

virtual TypeDeclarationAST * GLSL::AST::asTypeDeclaration ( )
inlinevirtual

Reimplemented in GLSL::TypeDeclarationAST.

Definition at line 255 of file glslast_p.h.

◆ asUnaryExpression()

virtual UnaryExpressionAST * GLSL::AST::asUnaryExpression ( )
inlinevirtual

Reimplemented in GLSL::UnaryExpressionAST.

Definition at line 222 of file glslast_p.h.

◆ asVariableDeclaration()

virtual VariableDeclarationAST * GLSL::AST::asVariableDeclaration ( )
inlinevirtual

Reimplemented in GLSL::VariableDeclarationAST.

Definition at line 254 of file glslast_p.h.

◆ asWhileStatement()

virtual WhileStatementAST * GLSL::AST::asWhileStatement ( )
inlinevirtual

Reimplemented in GLSL::WhileStatementAST.

Definition at line 234 of file glslast_p.h.

◆ finish()

template<typename T >
static List< T > * GLSL::AST::finish ( List< T > * list)
inlinestaticprotected

Definition at line 277 of file glslast_p.h.

References list.

Member Data Documentation

◆ kind

int GLSL::AST::kind

Definition at line 285 of file glslast_p.h.

Referenced by GLSL::Semantic::visit().

◆ lineno


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