27 struct StructTypeDenoter;
102 const AST*
ast =
nullptr);
Definition Analyzer.hpp:30
Variant evaluateOrDefault(Expression &expression, const Variant &defaultValue={})
ReportHandler & getReportHandler()
Definition Analyzer.hpp:62
StructDeclaration * findCompatibleStructDeclaration(const StructDeclaration &rhs)
AST * fetch(const String &ident, const AST *ast=nullptr)
void error(const String &msg, const AST *ast=nullptr, const Vector< const AST * > &astAppendices={})
Variant evaluateConstExpression(Expression &expression)
TypeDenoterPtr getTypeDenoterFrom(TypedAST *ast, const TypeDenoter *expectedTypeDenoter=nullptr)
Int32 evaluateConstExpressionInt(Expression &expression)
void analyzeBufferTypeDenoter(BufferTypeDenoter &bufferTypeDen, const AST *ast)
Analyzer(Log *log=nullptr)
ASTSymbolTable::OnOverrideProc OnOverrideProc
Definition Analyzer.hpp:45
void validateTypeCast(const TypeDenoter &sourceTypeDen, const TypeDenoter &destTypeDen, const String &contextDesc, const AST *ast=nullptr)
bool isInsideGlobalScope() const
VarDeclaration * fetchVarDeclarationFromStruct(const StructTypeDenoter &structTypeDenoter, const String &ident, const AST *ast=nullptr)
void onReleaseSymbol(const ASTSymbolOverloadPtr &symbol)
void analyzeAliasTypeDenoter(TypeDenoterPtr &typeDenoter, const AST *ast)
FunctionDeclaration * fetchFunctionDeclaration(const String &ident, const AST *ast=nullptr)
ReportHandler mReportHandler
Definition Analyzer.hpp:32
void errorUndeclaredIdent(const String &ident, const AST *ast=nullptr)
void analyzeTypeDenoter(TypeDenoterPtr &typeDenoter, const AST *ast)
StructDeclaration * fetchStructDeclarationFromIdent(const String &ident, const AST *ast=nullptr)
bool decorateAST(Program &program, const ShaderInput &inputDesc, const ShaderOutput &outputDesc)
float evaluateConstExpressionFloat(Expression &expression)
bool isWarningEnabled(UInt32 flags) const
void analyzeFunctionControlPath(FunctionDeclaration &funcDeclaration)
void errorUndeclaredIdent(const String &ident, const String &contextName, const String &similarIdent, const AST *ast=nullptr)
String fetchSimilarIdent(const String &ident, StructDeclaration *structDeclaration=nullptr) const
void errorUndeclaredIdent(const String &ident, const String &contextName, const AST *ast=nullptr)
void analyzeConditionalExpression(Expression *expression)
void submitReport(bool isError, const String &msg, const AST *ast=nullptr, const Vector< const AST * > &astAppendices={})
Declaration * fetchDeclaration(const String &ident, const AST *ast=nullptr)
AST * fetchFromCurrentScopeOrNull(const String &ident) const
RawFlags mWarnings
Definition Analyzer.hpp:37
FunctionDeclaration * fetchFunctionDeclaration(const String &ident, const Vector< ExpressionPtr > &args, const AST *ast=nullptr)
void warning(const String &msg, const AST *ast=nullptr)
void analyzeFunctionEndOfScopes(const FunctionDeclaration &funcDeclaration)
void analyzeStructTypeDenoter(StructTypeDenoter &structTypeDen, const AST *ast)
void errorInternal(const String &msg, const AST *ast=nullptr)
Variant evaluateConstExpressionObject(const ObjectExpression &expression)
void warningOnNullStatement(const StatementPtr &ast, const String &statementTypeName)
void analyzeTypeSpecifierForParameter(const TypeSpecifier *typeSpecifier)
StructDeclaration * fetchStructDeclarationFromTypeDenoter(const TypeDenoter &typeDenoter)
FunctionDeclaration * fetchFunctionDeclarationFromStruct(const StructTypeDenoter &structTypeDenoter, const String &ident, const Vector< ExpressionPtr > &args, const AST *ast=nullptr)
bool collectArgumentTypeDenoters(const Vector< ExpressionPtr > &args, Vector< TypeDenoterPtr > &argTypeDens)
Declaration * fetchType(const String &ident, const AST *ast=nullptr)
void analyzeTypeSpecifier(TypeSpecifier *typeSpecifier)
ASTSymbolOverloadTable mSymTable
Definition Analyzer.hpp:35
void validateTypeCastFrom(TypedAST *sourceAST, TypedAST *destAST, const String &contextDesc)
VarDeclaration * fetchVarDeclaration(const String &ident, const AST *ast=nullptr)
void register_(const String &ident, AST *ast)
virtual void decorateASTPrimary(Program &program, const ShaderInput &inputDesc, const ShaderOutput &outputDesc)=0
SourceCode * mSourceCode
Definition Analyzer.hpp:33
Log base class.
Definition Log.hpp:19
Definition ReportHandler.hpp:31
Definition SourceCode.hpp:24
UniqueFunction< bool(SymbolType &prevSymbol) const > OnOverrideProc
Definition SymbolTable.hpp:46
Definition Variant.hpp:20
Definition VisitorTracker.hpp:18
SPtr< Statement > StatementPtr
Definition Visitor.hpp:25
SPtr< TypeDenoter > TypeDenoterPtr
Definition TypeDenoter.hpp:29
SPtr< ASTSymbolOverload > ASTSymbolOverloadPtr
Definition SymbolTable.hpp:259
std::vector< T, ScopedAllocatorAdaptor< StdAllocator< T, RawAllocator > > > Vector
Vector is a sequence container that encapsulates dynamic size arrays.
Definition Vector.hpp:17
std::int32_t Int32
Definition DataTypes.hpp:21
std::uint32_t UInt32
Definition DataTypes.hpp:23
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Buffer type denoter with generic sub type and generic size.
Definition TypeDenoter.hpp:265
Shader output descriptor structure.
Definition ShaderCompiler.hpp:293
Definition TypeDenoter.hpp:318
Definition TypeDenoter.hpp:82