1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#include "glslsymbol_p.h"
5#include <QStringList>
6
7QT_BEGIN_NAMESPACE
8
9using namespace GLSL;
10
11Symbol::Symbol(Scope *scope)
12 : _scope(scope)
13{
14}
15
16Symbol::~Symbol()
17{
18}
19
20Scope *Symbol::scope() const
21{
22 return _scope;
23}
24
25void Symbol::setScope(Scope *scope)
26{
27 _scope = scope;
28}
29
30QString Symbol::name() const
31{
32 return _name;
33}
34
35void Symbol::setName(const QString &name)
36{
37 _name = name;
38}
39
40Scope::Scope(Scope *enclosingScope)
41 : Symbol(enclosingScope)
42{
43}
44
45Symbol *Scope::lookup(const QString &name) const
46{
47 if (Symbol *s = find(name))
48 return s;
49 if (Scope *s = scope())
50 return s->lookup(name);
51
52 return nullptr;
53}
54
55QList<Symbol *> Scope::members() const
56{
57 return QList<Symbol *>();
58}
59
60QT_END_NAMESPACE
61

source code of qtquick3d/src/glslparser/glslsymbol.cpp