forked from qt-creator/qt-creator
Create symbols for variable declarations.
This commit is contained in:
@@ -592,8 +592,11 @@ bool Semantic::visit(ParameterDeclarationAST *ast)
|
||||
bool Semantic::visit(VariableDeclarationAST *ast)
|
||||
{
|
||||
const Type *ty = type(ast->type);
|
||||
Q_UNUSED(ty);
|
||||
ExprResult initializer = expression(ast->initializer);
|
||||
if (ast->name) {
|
||||
Variable *var = _engine->newVariable(_scope, *ast->name, ty);
|
||||
_scope->add(var);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user