28 Engine *previousEngine = _engine;
30 return previousEngine;
35 Scope *previousScope = _scope;
101 if (
s->asOverloadSet() !=
nullptr ||
s->asFunction() !=
nullptr)
108 }
else if (ast->
type) {
164 _expr.
type =
s->type();
201 _expr = idxType->indexElementType();
270 _expr.
type =
s->type();
275 _expr.
type =
s->type();
291 }
else if (
target->asUIntType() !=
nullptr) {
292 return type->asIntType() !=
nullptr;
293 }
else if (
target->asFloatType() !=
nullptr) {
294 return type->asIntType() !=
nullptr ||
295 type->asUIntType() !=
nullptr;
296 }
else if (
target->asDoubleType() !=
nullptr) {
297 return type->asIntType() !=
nullptr ||
298 type->asUIntType() !=
nullptr ||
299 type->asFloatType() !=
nullptr;
302 if (targetVecTy->dimension() == vecTy->dimension()) {
303 const Type *targetElementType = targetVecTy->elementType();
304 const Type *elementType = vecTy->elementType();
306 if (targetElementType->
asUIntType() !=
nullptr) {
308 return elementType->
asIntType() !=
nullptr;
309 }
else if (targetElementType->
asFloatType() !=
nullptr) {
311 return elementType->
asIntType() !=
nullptr ||
313 }
else if (targetElementType->
asDoubleType() !=
nullptr) {
315 return elementType->
asIntType() !=
nullptr ||
323 if (targetMatTy->columns() == matTy->columns() &&
324 targetMatTy->rows() == matTy->rows()) {
325 const Type *targetElementType = targetMatTy->elementType();
326 const Type *elementType = matTy->elementType();
350 if (actuals.
size() < funTy->argumentCount())
352 else if (actuals.
size() > funTy->argumentCount())
354 _expr.
type = funTy->returnType();
357 foreach (
Function *
f, overloads->functions()) {
358 if (
f->argumentCount() == actuals.
size()) {
360 for (; argc < actuals.
size(); ++argc) {
361 const Type *actualTy = actuals.
at(argc).type;
362 const Type *argumentTy =
f->argumentAt(argc)->type();
367 if (argc == actuals.
size())
374 Q_ASSERT(! overloads->functions().isEmpty());
376 _expr.
type = overloads->functions().constFirst()->returnType();
380 if (candidates.
size() != 1) {
386 _expr.
type =
id.type;
489 switch (ast->
token) {
844 if (
Scope *enclosingScope =
fun->scope())
845 enclosingScope->add(
fun);
@ T_SAMPLERCUBEARRAYSHADOW
static const char *const spell[]
virtual QualifiedTypeAST * asQualifiedType()
List< StatementAST * > * statements
ExpressionAST * initializer
ExpressionAST * condition
const UndefinedType * undefinedType()
const UIntType * uintType()
Struct * newStruct(Scope *scope=nullptr)
const MatrixType * matrixType(const Type *elementType, int columns, int rows)
const BoolType * boolType()
const ArrayType * arrayType(const Type *elementType)
const VoidType * voidType()
const IntType * intType()
const SamplerType * samplerType(int kind)
void error(int line, const QString &message)
const VectorType * vectorType(const Type *elementType, int dimension)
const DoubleType * doubleType()
Variable * newVariable(Scope *scope, const QString &name, const Type *type, int qualifiers=0)
Argument * newArgument(Function *function, const QString &name, const Type *type)
Block * newBlock(Scope *scope=nullptr)
const FloatType * floatType()
Function * newFunction(Scope *scope=nullptr)
ExpressionAST * condition
ExpressionAST * increment
List< ExpressionAST * > * arguments
FunctionIdentifierAST * id
List< ParameterDeclarationAST * > * params
const Function * asFunctionType() const override
StatementAST * elseClause
StatementAST * thenClause
ExpressionAST * condition
const IndexType * asIndexType() const override
List< DeclarationAST * > * decls
const MatrixType * asMatrixType() const override
const OverloadSet * asOverloadSetType() const override
List< LayoutQualifierAST * > * layout_list
virtual void add(Symbol *symbol)=0
Symbol * lookup(const QString &name) const
void parameterDeclaration(ParameterDeclarationAST *ast, Function *fun)
Symbol * field(StructTypeAST::Field *ast)
const Type * type(TypeAST *ast)
void declaration(DeclarationAST *ast)
void translationUnit(TranslationUnitAST *ast, Scope *globalScope, Engine *engine)
Scope * switchScope(Scope *scope)
void statement(StatementAST *ast)
Engine * switchEngine(Engine *engine)
ExprResult expression(ExpressionAST *ast, Scope *scope, Engine *engine)
bool visit(TranslationUnitAST *ast) override
ExprResult functionIdentifier(FunctionIdentifierAST *ast)
bool implicitCast(const Type *type, const Type *target) const
Struct * asStruct() override
void setName(const QString &name)
List< DeclarationAST * > * declarations
VariableDeclarationAST * varDecl
TypeDeclarationAST * typeDecl
virtual const DoubleType * asDoubleType() const
virtual const VectorType * asVectorType() const
virtual const IntType * asIntType() const
virtual const Struct * asStructType() const
virtual const UIntType * asUIntType() const
virtual const FloatType * asFloatType() const
ExpressionAST * initializer
const VectorType * asVectorType() const override
ExpressionAST * condition
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
const T & constFirst() const noexcept
void append(parameter_type t)
\macro QT_RESTRICTED_CAST_FROM_ASCII
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString arg(qlonglong a, int fieldwidth=0, int base=10, QChar fillChar=u' ') const
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
bool contains(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QSet< QString >::iterator it
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLdouble GLdouble GLdouble GLdouble q
QtConcurrent::task([]{ qDebug("Hello, world!");}).spawn(FutureResult void increment(QPromise< int > &promise, int i)
[10]
\inmodule QtCore \reentrant