diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/glsl/glslsemantic.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/libs/glsl/glslsemantic.cpp b/src/libs/glsl/glslsemantic.cpp index 1729151a12..e533a1ba06 100644 --- a/src/libs/glsl/glslsemantic.cpp +++ b/src/libs/glsl/glslsemantic.cpp @@ -144,7 +144,17 @@ bool Semantic::visit(StructTypeAST::Field *ast) // expressions bool Semantic::visit(IdentifierExpressionAST *ast) { - Q_UNUSED(ast); + if (ast->name) { + if (Symbol *s = _scope->lookup(*ast->name)) { + _expr.type = s->type(); + } else { + if (ast->name->startsWith(QLatin1String("gl_")) || ast->name->startsWith(QLatin1String("qgl_"))) { + // ### well, at least for now. + } else { + _engine->error(ast->lineno, QString("Undefined symbol `%1'").arg(*ast->name)); + } + } + } return false; } |