![]() |
Qt 6.x
The Qt SDK
|
#include <glslsemantic_p.h>
Classes | |
struct | ExprResult |
Public Member Functions | |
Semantic () | |
~Semantic () override | |
void | translationUnit (TranslationUnitAST *ast, Scope *globalScope, Engine *engine) |
ExprResult | expression (ExpressionAST *ast, Scope *scope, Engine *engine) |
Definition at line 25 of file glslsemantic_p.h.
Semantic::Semantic | ( | ) |
Definition at line 15 of file glslsemantic.cpp.
|
override |
Definition at line 22 of file glslsemantic.cpp.
|
protected |
Definition at line 63 of file glslsemantic.cpp.
References GLSL::Visitor::accept().
Referenced by translationUnit(), visit(), visit(), and visit().
|
protected |
Definition at line 40 of file glslsemantic.cpp.
References GLSL::Visitor::accept(), and GLSL::Engine::undefinedType().
Semantic::ExprResult Semantic::expression | ( | ExpressionAST * | ast, |
Scope * | scope, | ||
Engine * | engine | ||
) |
Definition at line 82 of file glslsemantic.cpp.
References engine, expression(), switchEngine(), switchScope(), and void.
Referenced by expression(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), visit(), and visit().
|
protected |
Definition at line 117 of file glslsemantic.cpp.
References GLSL::StructTypeAST::Field::name, GLSL::Engine::newVariable(), and GLSL::StructTypeAST::Field::type.
Referenced by visit().
|
protected |
Definition at line 95 of file glslsemantic.cpp.
References QString::arg(), GLSL::Engine::error(), QString::fromLatin1(), GLSL::AST::lineno, GLSL::Scope::lookup(), GLSL::FunctionIdentifierAST::name, and GLSL::FunctionIdentifierAST::type.
Referenced by visit().
Definition at line 285 of file glslsemantic.cpp.
References GLSL::Type::asDoubleType(), GLSL::Type::asFloatType(), GLSL::Type::asIntType(), GLSL::MatrixType::asMatrixType(), GLSL::Type::asUIntType(), and GLSL::VectorType::asVectorType().
Referenced by visit().
|
protected |
Definition at line 127 of file glslsemantic.cpp.
References arg, fun, GLSL::ParameterDeclarationAST::name, GLSL::Engine::newArgument(), and GLSL::ParameterDeclarationAST::type.
Referenced by visit().
|
protected |
Definition at line 49 of file glslsemantic.cpp.
References GLSL::Visitor::accept().
Referenced by visit(), visit(), visit(), visit(), visit(), visit(), and visit().
Definition at line 26 of file glslsemantic.cpp.
References engine.
Referenced by expression(), and translationUnit().
Definition at line 33 of file glslsemantic.cpp.
Referenced by expression(), translationUnit(), visit(), visit(), and visit().
void Semantic::translationUnit | ( | TranslationUnitAST * | ast, |
Scope * | globalScope, | ||
Engine * | engine | ||
) |
Definition at line 68 of file glslsemantic.cpp.
References declaration(), GLSL::TranslationUnitAST::declarations, engine, it, switchEngine(), switchScope(), and void.
Definition at line 54 of file glslsemantic.cpp.
References GLSL::Visitor::accept(), and GLSL::Engine::undefinedType().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 730 of file glslsemantic.cpp.
References GLSL::Engine::arrayType(), GLSL::ArrayTypeAST::elementType, expression(), Q_UNUSED, and GLSL::ArrayTypeAST::size.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 257 of file glslsemantic.cpp.
References expression(), GLSL::AssignmentExpressionAST::value, and GLSL::AssignmentExpressionAST::variable.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 487 of file glslsemantic.cpp.
References QString::arg(), GLSL::Engine::boolType(), GLSL::Engine::doubleType(), GLSL::Engine::error(), GLSL::Engine::floatType(), QString::fromLatin1(), GLSL::Engine::intType(), GLSL::AST::lineno, GLSL::Engine::matrixType(), GLSL::Engine::samplerType(), GLSLParserTable::spell, GLSLParserTable::T_BOOL, GLSLParserTable::T_BVEC2, GLSLParserTable::T_BVEC3, GLSLParserTable::T_BVEC4, GLSLParserTable::T_DMAT2, GLSLParserTable::T_DMAT2X2, GLSLParserTable::T_DMAT2X3, GLSLParserTable::T_DMAT2X4, GLSLParserTable::T_DMAT3, GLSLParserTable::T_DMAT3X2, GLSLParserTable::T_DMAT3X3, GLSLParserTable::T_DMAT3X4, GLSLParserTable::T_DMAT4, GLSLParserTable::T_DMAT4X2, GLSLParserTable::T_DMAT4X3, GLSLParserTable::T_DMAT4X4, GLSLParserTable::T_DOUBLE, GLSLParserTable::T_DVEC2, GLSLParserTable::T_DVEC3, GLSLParserTable::T_DVEC4, GLSLParserTable::T_FLOAT, GLSLParserTable::T_INT, GLSLParserTable::T_ISAMPLER1D, GLSLParserTable::T_ISAMPLER1DARRAY, GLSLParserTable::T_ISAMPLER2D, GLSLParserTable::T_ISAMPLER2DARRAY, GLSLParserTable::T_ISAMPLER2DMS, GLSLParserTable::T_ISAMPLER2DMSARRAY, GLSLParserTable::T_ISAMPLER2DRECT, GLSLParserTable::T_ISAMPLER3D, GLSLParserTable::T_ISAMPLERBUFFER, GLSLParserTable::T_ISAMPLERCUBE, GLSLParserTable::T_ISAMPLERCUBEARRAY, GLSLParserTable::T_IVEC2, GLSLParserTable::T_IVEC3, GLSLParserTable::T_IVEC4, GLSLParserTable::T_MAT2, GLSLParserTable::T_MAT2X2, GLSLParserTable::T_MAT2X3, GLSLParserTable::T_MAT2X4, GLSLParserTable::T_MAT3, GLSLParserTable::T_MAT3X2, GLSLParserTable::T_MAT3X3, GLSLParserTable::T_MAT3X4, GLSLParserTable::T_MAT4, GLSLParserTable::T_MAT4X2, GLSLParserTable::T_MAT4X3, GLSLParserTable::T_MAT4X4, GLSLParserTable::T_SAMPLER1D, GLSLParserTable::T_SAMPLER1DARRAY, GLSLParserTable::T_SAMPLER1DARRAYSHADOW, GLSLParserTable::T_SAMPLER1DSHADOW, GLSLParserTable::T_SAMPLER2D, GLSLParserTable::T_SAMPLER2DARRAY, GLSLParserTable::T_SAMPLER2DARRAYSHADOW, GLSLParserTable::T_SAMPLER2DMS, GLSLParserTable::T_SAMPLER2DMSARRAY, GLSLParserTable::T_SAMPLER2DRECT, GLSLParserTable::T_SAMPLER2DRECTSHADOW, GLSLParserTable::T_SAMPLER2DSHADOW, GLSLParserTable::T_SAMPLER3D, GLSLParserTable::T_SAMPLERBUFFER, GLSLParserTable::T_SAMPLERCUBE, GLSLParserTable::T_SAMPLERCUBEARRAY, GLSLParserTable::T_SAMPLERCUBEARRAYSHADOW, GLSLParserTable::T_SAMPLERCUBESHADOW, GLSLParserTable::T_UINT, GLSLParserTable::T_USAMPLER1D, GLSLParserTable::T_USAMPLER1DARRAY, GLSLParserTable::T_USAMPLER2D, GLSLParserTable::T_USAMPLER2DARRAY, GLSLParserTable::T_USAMPLER2DMS, GLSLParserTable::T_USAMPLER2DMSARRAY, GLSLParserTable::T_USAMPLER2DRECT, GLSLParserTable::T_USAMPLER3D, GLSLParserTable::T_USAMPLERBUFFER, GLSLParserTable::T_USAMPLERCUBE, GLSLParserTable::T_USAMPLERCUBEARRAY, GLSLParserTable::T_UVEC2, GLSLParserTable::T_UVEC3, GLSLParserTable::T_UVEC4, GLSLParserTable::T_VEC2, GLSLParserTable::T_VEC3, GLSLParserTable::T_VEC4, GLSLParserTable::T_VOID, GLSL::BasicTypeAST::token, GLSL::Engine::uintType(), GLSL::Engine::vectorType(), and GLSL::Engine::voidType().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 192 of file glslsemantic.cpp.
References QString::arg(), GLSL::IndexType::asIndexType(), GLSL::Engine::boolType(), GLSL::Engine::error(), expression(), QString::fromLatin1(), GLSL::Semantic::ExprResult::isConstant, GLSL::AST::kind, GLSL::AST::Kind_ArrayAccess, GLSL::AST::Kind_BitwiseAnd, GLSL::AST::Kind_BitwiseOr, GLSL::AST::Kind_BitwiseXor, GLSL::AST::Kind_Comma, GLSL::AST::Kind_Divide, GLSL::AST::Kind_Equal, GLSL::AST::Kind_GreaterEqual, GLSL::AST::Kind_GreaterThan, GLSL::AST::Kind_LessEqual, GLSL::AST::Kind_LessThan, GLSL::AST::Kind_LogicalAnd, GLSL::AST::Kind_LogicalOr, GLSL::AST::Kind_LogicalXor, GLSL::AST::Kind_Minus, GLSL::AST::Kind_Modulus, GLSL::AST::Kind_Multiply, GLSL::AST::Kind_NotEqual, GLSL::AST::Kind_Plus, GLSL::AST::Kind_ShiftLeft, GLSL::AST::Kind_ShiftRight, GLSL::BinaryExpressionAST::left, GLSL::AST::lineno, GLSL::BinaryExpressionAST::right, and GLSL::Semantic::ExprResult::type.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 473 of file glslsemantic.cpp.
References GLSL::CaseLabelStatementAST::expr, and expression().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 410 of file glslsemantic.cpp.
References it, GLSL::Engine::newBlock(), statement(), GLSL::CompoundStatementAST::statements, switchScope(), GLSL::CompoundStatementAST::symbol, and void.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 393 of file glslsemantic.cpp.
References expression(), GLSL::DeclarationExpressionAST::initializer, Q_UNUSED, and GLSL::DeclarationExpressionAST::type.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 479 of file glslsemantic.cpp.
References GLSL::DeclarationStatementAST::decl, and declaration().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 438 of file glslsemantic.cpp.
References GLSL::DoStatementAST::body, GLSL::DoStatementAST::condition, expression(), and statement().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 404 of file glslsemantic.cpp.
References GLSL::ExpressionStatementAST::expr, and expression().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 445 of file glslsemantic.cpp.
References GLSL::ForStatementAST::body, GLSL::ForStatementAST::condition, expression(), increment(), GLSL::ForStatementAST::increment, GLSL::ForStatementAST::init, and statement().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 339 of file glslsemantic.cpp.
References QList< T >::append(), arg, GLSL::FunctionCallExpressionAST::arguments, GLSL::Function::asFunctionType(), GLSL::OverloadSet::asOverloadSetType(), QList< T >::at(), QList< T >::constFirst(), GLSL::Engine::error(), GLSL::FunctionCallExpressionAST::expr, expression(), QString::fromLatin1(), functionIdentifier(), GLSL::FunctionCallExpressionAST::id, implicitCast(), QList< T >::isEmpty(), it, GLSL::AST::lineno, Q_ASSERT, QList< T >::size(), and GLSL::Semantic::ExprResult::type.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 831 of file glslsemantic.cpp.
References GLSL::FunctionDeclarationAST::body, fun, it, GLSL::FunctionDeclarationAST::name, GLSL::Engine::newFunction(), parameterDeclaration(), GLSL::FunctionDeclarationAST::params, GLSL::FunctionDeclarationAST::returnType, statement(), switchScope(), and void.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 144 of file glslsemantic.cpp.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 160 of file glslsemantic.cpp.
References QString::arg(), GLSL::Engine::error(), QString::fromLatin1(), GLSL::AST::lineno, GLSL::Scope::lookup(), GLSL::IdentifierExpressionAST::name, and GLSL::Semantic::ExprResult::type.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 423 of file glslsemantic.cpp.
References GLSL::IfStatementAST::condition, GLSL::IfStatementAST::elseClause, expression(), statement(), and GLSL::IfStatementAST::thenClause.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 822 of file glslsemantic.cpp.
References declaration(), GLSL::InitDeclarationAST::decls, and it.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 816 of file glslsemantic.cpp.
References Q_UNUSED.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 454 of file glslsemantic.cpp.
References Q_UNUSED.
|
inlineoverrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 102 of file glslsemantic_p.h.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 171 of file glslsemantic.cpp.
References QString::at(), GLSL::Engine::boolType(), QString::contains(), GLSL::Engine::doubleType(), QString::endsWith(), GLSL::Engine::floatType(), GLSL::Engine::intType(), GLSL::Semantic::ExprResult::isConstant, GLSL::Semantic::ExprResult::type, GLSL::Engine::uintType(), and GLSL::LiteralExpressionAST::value.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 264 of file glslsemantic.cpp.
References QString::arg(), GLSL::Type::asStructType(), GLSL::Type::asVectorType(), GLSL::Engine::error(), GLSL::MemberAccessExpressionAST::expr, expression(), GLSL::MemberAccessExpressionAST::field, QString::fromLatin1(), GLSL::AST::lineno, and GLSL::Semantic::ExprResult::type.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 715 of file glslsemantic.cpp.
References QString::arg(), GLSL::Struct::asStruct(), GLSL::Engine::error(), QString::fromLatin1(), GLSL::AST::lineno, GLSL::Scope::lookup(), and GLSL::NamedTypeAST::name.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 777 of file glslsemantic.cpp.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 770 of file glslsemantic.cpp.
References Q_UNUSED, and GLSL::PrecisionDeclarationAST::type.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 756 of file glslsemantic.cpp.
References it, GLSL::QualifiedTypeAST::layout_list, Q_UNUSED, and GLSL::QualifiedTypeAST::type.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 460 of file glslsemantic.cpp.
References GLSL::ReturnStatementAST::expr, and expression().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 739 of file glslsemantic.cpp.
References e, field(), GLSL::StructTypeAST::fields, it, GLSL::StructTypeAST::name, GLSL::Engine::newStruct(), GLSL::Symbol::setName(), switchScope(), and void.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 151 of file glslsemantic.cpp.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 466 of file glslsemantic.cpp.
References GLSL::SwitchStatementAST::body, GLSL::SwitchStatementAST::expr, expression(), and statement().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 247 of file glslsemantic.cpp.
References expression(), GLSL::TernaryExpressionAST::first, GLSL::Semantic::ExprResult::isConstant, GLSL::TernaryExpressionAST::second, GLSL::TernaryExpressionAST::third, and GLSL::Semantic::ExprResult::type.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 137 of file glslsemantic.cpp.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 809 of file glslsemantic.cpp.
References declaration(), GLSL::TypeAndVariableDeclarationAST::typeDecl, and GLSL::TypeAndVariableDeclarationAST::varDecl.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 802 of file glslsemantic.cpp.
References Q_UNUSED, and GLSL::TypeDeclarationAST::type.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 240 of file glslsemantic.cpp.
References GLSL::UnaryExpressionAST::expr, and expression().
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 784 of file glslsemantic.cpp.
References GLSL::Scope::add(), GLSL::AST::asQualifiedType(), expression(), GLSL::VariableDeclarationAST::initializer, GLSL::VariableDeclarationAST::name, GLSL::Engine::newVariable(), GLSL::QualifiedTypeAST::qualifiers, GLSL::VariableDeclarationAST::type, and var.
|
overrideprotectedvirtual |
Reimplemented from GLSL::Visitor.
Definition at line 431 of file glslsemantic.cpp.
References GLSL::WhileStatementAST::body, GLSL::WhileStatementAST::condition, expression(), and statement().