CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ShaderCompiler::Expression Struct Reference

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

Inheritance diagram for CeresEngine::ShaderCompiler::Expression:
CeresEngine::ShaderCompiler::TypedAST CeresEngine::ShaderCompiler::AST CeresEngine::ShaderCompiler::ArrayExpression CeresEngine::ShaderCompiler::AssignExpression CeresEngine::ShaderCompiler::BinaryExpression CeresEngine::ShaderCompiler::BracketExpression CeresEngine::ShaderCompiler::CallExpression CeresEngine::ShaderCompiler::CastExpression CeresEngine::ShaderCompiler::InitializerExpression CeresEngine::ShaderCompiler::LiteralExpression CeresEngine::ShaderCompiler::NullExpression CeresEngine::ShaderCompiler::ObjectExpression CeresEngine::ShaderCompiler::PostUnaryExpression CeresEngine::ShaderCompiler::SequenceExpression CeresEngine::ShaderCompiler::TernaryExpression CeresEngine::ShaderCompiler::TypeSpecifierExpression CeresEngine::ShaderCompiler::UnaryExpression

Public Types

enum  : UInt32 { wasConverted = (1u << ( 0 )) }
 
- Public Types inherited from CeresEngine::ShaderCompiler::AST
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

VarDeclarationfetchVarDeclaration () const
 
virtual const ObjectExpressionfetchLValueExpression () const
 Returns the first node in the expression tree that is an l-value (may also be constant!), or null if there is no l-value.
 
ObjectExpressionfetchLValueExpression ()
 
virtual IndexedSemantic fetchSemantic () const
 
virtual bool isTrivialCopyable (UInt32 maxTreeDepth=3) const
 
virtual const Expressionfind (const FindPredicateConstFunctor &predicate, UInt32 flags=SearchAll) const
 
const ExpressionfindFirstOf (const Types expressionType, UInt32 flags=SearchAll) const
 
const ExpressionfindFirstNotOf (const Types expressionType, UInt32 flags=SearchAll) const
 
Expressionfind (const FindPredicateConstFunctor &predicate, UInt32 flags=SearchAll)
 
ExpressionfindFirstOf (const Types expressionType, UInt32 flags=SearchAll)
 
ExpressionfindFirstNotOf (const Types expressionType, UInt32 flags=SearchAll)
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::TypedAST
const TypeDenoterPtrgetTypeDenoter (const TypeDenoter *expectedTypeDenoter=nullptr)
 
void resetTypeDenoter ()
 
- Public Member Functions inherited from CeresEngine::ShaderCompiler::AST
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
 

Additional Inherited Members

- Static Public Member Functions inherited from CeresEngine::ShaderCompiler::AST
template<typename T >
static TgetAs (AST *ast)
 
template<typename T >
static const TgetAs (const AST *ast)
 
- Public Attributes inherited from CeresEngine::ShaderCompiler::AST
SourceArea area
 
RawFlags flags
 
- Protected Member Functions inherited from CeresEngine::ShaderCompiler::TypedAST
virtual TypeDenoterPtr deriveTypeDenoter (const TypeDenoter *expectedTypeDenoter)=0
 

Member Enumeration Documentation

◆ anonymous enum

Enumerator
wasConverted 

Member Function Documentation

◆ fetchLValueExpression() [1/2]

ObjectExpression * CeresEngine::ShaderCompiler::Expression::fetchLValueExpression ( )

◆ fetchLValueExpression() [2/2]

virtual const ObjectExpression * CeresEngine::ShaderCompiler::Expression::fetchLValueExpression ( ) const
virtual

Returns the first node in the expression tree that is an l-value (may also be constant!), or null if there is no l-value.

If the return value is non-null, the object expression must refer to a declaration object. By default null.

Reimplemented in CeresEngine::ShaderCompiler::UnaryExpression, CeresEngine::ShaderCompiler::BracketExpression, CeresEngine::ShaderCompiler::AssignExpression, CeresEngine::ShaderCompiler::ObjectExpression, and CeresEngine::ShaderCompiler::ArrayExpression.

◆ fetchSemantic()

◆ fetchVarDeclaration()

VarDeclaration * CeresEngine::ShaderCompiler::Expression::fetchVarDeclaration ( ) const

◆ find() [1/2]

Expression * CeresEngine::ShaderCompiler::Expression::find ( const FindPredicateConstFunctor predicate,
UInt32  flags = SearchAll 
)

◆ find() [2/2]

◆ findFirstNotOf() [1/2]

Expression * CeresEngine::ShaderCompiler::Expression::findFirstNotOf ( const Types  expressionType,
UInt32  flags = SearchAll 
)

◆ findFirstNotOf() [2/2]

const Expression * CeresEngine::ShaderCompiler::Expression::findFirstNotOf ( const Types  expressionType,
UInt32  flags = SearchAll 
) const

◆ findFirstOf() [1/2]

Expression * CeresEngine::ShaderCompiler::Expression::findFirstOf ( const Types  expressionType,
UInt32  flags = SearchAll 
)

◆ findFirstOf() [2/2]

const Expression * CeresEngine::ShaderCompiler::Expression::findFirstOf ( const Types  expressionType,
UInt32  flags = SearchAll 
) const

◆ isTrivialCopyable()

virtual bool CeresEngine::ShaderCompiler::Expression::isTrivialCopyable ( UInt32  maxTreeDepth = 3) const
virtual

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