forked from qt-creator/qt-creator
Making GLSL AST nodes while preserving lineno info
Eventually we will need some way to locate an identifier's definition, so add "lineno" to each AST node. May want to change this to "position" later. The makeAstNode<T>() function takes care of automatically decorating nodes with line numbers.
This commit is contained in:
@@ -70,10 +70,10 @@ class GLSL_EXPORT List: public Managed
|
||||
{
|
||||
public:
|
||||
List(const T &value)
|
||||
: value(value), next(this) {}
|
||||
: value(value), next(this), lineno(0) {}
|
||||
|
||||
List(List *previous, const T &value)
|
||||
: value(value)
|
||||
: value(value), lineno(0)
|
||||
{
|
||||
next = previous->next;
|
||||
previous->next = this;
|
||||
@@ -88,6 +88,7 @@ public:
|
||||
|
||||
T value;
|
||||
List *next;
|
||||
int lineno;
|
||||
};
|
||||
|
||||
// Append two lists, which are assumed to still be circular, pre-finish.
|
||||
|
||||
Reference in New Issue
Block a user