CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShaderCompiler::AST Struct Referenceabstract

#include <CeresEngine/Material/ShaderCompiler/AST/AST.hpp>

Inheritance diagram for CeresEngine::ShaderCompiler::AST:
CeresEngine::ShaderCompiler::Attribute CeresEngine::ShaderCompiler::CodeBlock CeresEngine::ShaderCompiler::PackOffset CeresEngine::ShaderCompiler::Program CeresEngine::ShaderCompiler::Register CeresEngine::ShaderCompiler::SamplerValue CeresEngine::ShaderCompiler::Statement CeresEngine::ShaderCompiler::SwitchCase CeresEngine::ShaderCompiler::TypedAST

Public Types

enum class  Types {
  Program , CodeBlock , Attribute , SwitchCase ,
  SamplerValue , Register , PackOffset , ArrayDimension ,
  TypeSpecifier , VarDeclaration , BufferDeclaration , SamplerDeclaration ,
  StructDeclaration , AliasDeclaration , FunctionDeclaration , UniformBufferDeclaration ,
  VarDeclarationStatement , BufferDeclarationStatement , SamplerDeclarationStatement , AliasDeclarationStatement ,
  BasicDeclarationStatement , NullStatement , CodeBlockStatement , ForLoopStatement ,
  WhileLoopStatement , DoWhileLoopStatement , IfStatement , ElseStatement ,
  SwitchStatement , ExpressionStatement , ReturnStatement , CtrlTransferStatement ,
  LayoutStatement , NullExpression , SequenceExpression , LiteralExpression ,
  TypeSpecifierExpression , TernaryExpression , BinaryExpression , UnaryExpression ,
  PostUnaryExpression , CallExpression , BracketExpression , ObjectExpression ,
  AssignExpression , ArrayExpression , CastExpression , InitializerExpression
}
 
enum  : UInt32 { isReachable = (1u << ( 30 )) , isDeadCode = (1u << ( 29 )) , isBuiltin = (1u << ( 28 )) }
 

Public Member Functions

virtual ~AST ()
 
virtual Types getType () const =0
 
virtual void visit (Visitor *visitor, void *args=nullptr)=0
 
template<typename T >
Tas ()
 
template<typename T >
const Tas () const
 

Static Public Member Functions

template<typename T >
static TgetAs (AST *ast)
 
template<typename T >
static const TgetAs (const AST *ast)
 

Public Attributes

SourceArea area
 
RawFlags flags
 

Member Enumeration Documentation

◆ anonymous enum

Enumerator
isReachable 
isDeadCode 
isBuiltin 

◆ Types

Enumerator
Program 
CodeBlock 
Attribute 
SwitchCase 
SamplerValue 
Register 
PackOffset 
ArrayDimension 
TypeSpecifier 
VarDeclaration 
BufferDeclaration 
SamplerDeclaration 
StructDeclaration 
AliasDeclaration 
FunctionDeclaration 
UniformBufferDeclaration 
VarDeclarationStatement 
BufferDeclarationStatement 
SamplerDeclarationStatement 
AliasDeclarationStatement 
BasicDeclarationStatement 
NullStatement 
CodeBlockStatement 
ForLoopStatement 
WhileLoopStatement 
DoWhileLoopStatement 
IfStatement 
ElseStatement 
SwitchStatement 
ExpressionStatement 
ReturnStatement 
CtrlTransferStatement 
LayoutStatement 
NullExpression 
SequenceExpression 
LiteralExpression 
TypeSpecifierExpression 
TernaryExpression 
BinaryExpression 
UnaryExpression 
PostUnaryExpression 
CallExpression 
BracketExpression 
ObjectExpression 
AssignExpression 
ArrayExpression 
CastExpression 
InitializerExpression 

Constructor & Destructor Documentation

◆ ~AST()

virtual CeresEngine::ShaderCompiler::AST::~AST ( )
virtual

Member Function Documentation

◆ as() [1/2]

template<typename T >
T * CeresEngine::ShaderCompiler::AST::as ( )
inline

◆ as() [2/2]

template<typename T >
const T * CeresEngine::ShaderCompiler::AST::as ( ) const
inline

◆ getAs() [1/2]

template<typename T >
static T * CeresEngine::ShaderCompiler::AST::getAs ( AST ast)
inlinestatic

◆ getAs() [2/2]

template<typename T >
static const T * CeresEngine::ShaderCompiler::AST::getAs ( const AST ast)
inlinestatic

◆ getType()

virtual Types CeresEngine::ShaderCompiler::AST::getType ( ) const
pure virtual

Implemented in CeresEngine::ShaderCompiler::Program, CeresEngine::ShaderCompiler::CodeBlock, CeresEngine::ShaderCompiler::SamplerValue, CeresEngine::ShaderCompiler::Attribute, CeresEngine::ShaderCompiler::SwitchCase, CeresEngine::ShaderCompiler::Register, CeresEngine::ShaderCompiler::PackOffset, CeresEngine::ShaderCompiler::ArrayDimension, CeresEngine::ShaderCompiler::TypeSpecifier, CeresEngine::ShaderCompiler::VarDeclaration, CeresEngine::ShaderCompiler::BufferDeclaration, CeresEngine::ShaderCompiler::SamplerDeclaration, CeresEngine::ShaderCompiler::StructDeclaration, CeresEngine::ShaderCompiler::AliasDeclaration, CeresEngine::ShaderCompiler::FunctionDeclaration, CeresEngine::ShaderCompiler::UniformBufferDeclaration, CeresEngine::ShaderCompiler::BufferDeclarationStatement, CeresEngine::ShaderCompiler::SamplerDeclarationStatement, CeresEngine::ShaderCompiler::BasicDeclarationStatement, CeresEngine::ShaderCompiler::VarDeclarationStatement, CeresEngine::ShaderCompiler::AliasDeclarationStatement, CeresEngine::ShaderCompiler::NullStatement, CeresEngine::ShaderCompiler::CodeBlockStatement, CeresEngine::ShaderCompiler::ForLoopStatement, CeresEngine::ShaderCompiler::WhileLoopStatement, CeresEngine::ShaderCompiler::DoWhileLoopStatement, CeresEngine::ShaderCompiler::IfStatement, CeresEngine::ShaderCompiler::ElseStatement, CeresEngine::ShaderCompiler::SwitchStatement, CeresEngine::ShaderCompiler::ExpressionStatement, CeresEngine::ShaderCompiler::ReturnStatement, CeresEngine::ShaderCompiler::CtrlTransferStatement, CeresEngine::ShaderCompiler::LayoutStatement, CeresEngine::ShaderCompiler::NullExpression, CeresEngine::ShaderCompiler::SequenceExpression, CeresEngine::ShaderCompiler::LiteralExpression, CeresEngine::ShaderCompiler::TypeSpecifierExpression, CeresEngine::ShaderCompiler::TernaryExpression, CeresEngine::ShaderCompiler::BinaryExpression, CeresEngine::ShaderCompiler::UnaryExpression, CeresEngine::ShaderCompiler::PostUnaryExpression, CeresEngine::ShaderCompiler::CallExpression, CeresEngine::ShaderCompiler::BracketExpression, CeresEngine::ShaderCompiler::AssignExpression, CeresEngine::ShaderCompiler::ObjectExpression, CeresEngine::ShaderCompiler::ArrayExpression, CeresEngine::ShaderCompiler::CastExpression, and CeresEngine::ShaderCompiler::InitializerExpression.

◆ visit()

virtual void CeresEngine::ShaderCompiler::AST::visit ( Visitor visitor,
void args = nullptr 
)
pure virtual

Implemented in CeresEngine::ShaderCompiler::Program, CeresEngine::ShaderCompiler::CodeBlock, CeresEngine::ShaderCompiler::SamplerValue, CeresEngine::ShaderCompiler::Attribute, CeresEngine::ShaderCompiler::SwitchCase, CeresEngine::ShaderCompiler::Register, CeresEngine::ShaderCompiler::PackOffset, CeresEngine::ShaderCompiler::ArrayDimension, CeresEngine::ShaderCompiler::TypeSpecifier, CeresEngine::ShaderCompiler::VarDeclaration, CeresEngine::ShaderCompiler::BufferDeclaration, CeresEngine::ShaderCompiler::SamplerDeclaration, CeresEngine::ShaderCompiler::StructDeclaration, CeresEngine::ShaderCompiler::AliasDeclaration, CeresEngine::ShaderCompiler::FunctionDeclaration, CeresEngine::ShaderCompiler::UniformBufferDeclaration, CeresEngine::ShaderCompiler::BufferDeclarationStatement, CeresEngine::ShaderCompiler::SamplerDeclarationStatement, CeresEngine::ShaderCompiler::BasicDeclarationStatement, CeresEngine::ShaderCompiler::VarDeclarationStatement, CeresEngine::ShaderCompiler::AliasDeclarationStatement, CeresEngine::ShaderCompiler::NullStatement, CeresEngine::ShaderCompiler::CodeBlockStatement, CeresEngine::ShaderCompiler::ForLoopStatement, CeresEngine::ShaderCompiler::WhileLoopStatement, CeresEngine::ShaderCompiler::DoWhileLoopStatement, CeresEngine::ShaderCompiler::IfStatement, CeresEngine::ShaderCompiler::ElseStatement, CeresEngine::ShaderCompiler::SwitchStatement, CeresEngine::ShaderCompiler::ExpressionStatement, CeresEngine::ShaderCompiler::ReturnStatement, CeresEngine::ShaderCompiler::CtrlTransferStatement, CeresEngine::ShaderCompiler::LayoutStatement, CeresEngine::ShaderCompiler::NullExpression, CeresEngine::ShaderCompiler::SequenceExpression, CeresEngine::ShaderCompiler::LiteralExpression, CeresEngine::ShaderCompiler::TypeSpecifierExpression, CeresEngine::ShaderCompiler::TernaryExpression, CeresEngine::ShaderCompiler::BinaryExpression, CeresEngine::ShaderCompiler::UnaryExpression, CeresEngine::ShaderCompiler::PostUnaryExpression, CeresEngine::ShaderCompiler::CallExpression, CeresEngine::ShaderCompiler::BracketExpression, CeresEngine::ShaderCompiler::AssignExpression, CeresEngine::ShaderCompiler::ObjectExpression, CeresEngine::ShaderCompiler::ArrayExpression, CeresEngine::ShaderCompiler::CastExpression, and CeresEngine::ShaderCompiler::InitializerExpression.

Member Data Documentation

◆ area

SourceArea CeresEngine::ShaderCompiler::AST::area

◆ flags

RawFlags CeresEngine::ShaderCompiler::AST::flags

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