summaryrefslogtreecommitdiffstats
path: root/src/glsl/ast.h
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-12-23 09:56:03 -0800
committerIan Romanick <[email protected]>2012-01-06 14:32:50 -0800
commitfa0a9ac5cdf49865cfc289c4326c73c9dd4a61c5 (patch)
tree6e0eb68b1d701086f32494e88e90fc8c70356c29 /src/glsl/ast.h
parentc87247f6a8c5505fea3fa29dac372f9f5316a118 (diff)
glsl: Track descriptions of some expressions that can't be l-values
Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r--src/glsl/ast.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index d899bc62a81..1f78af87e5a 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -207,6 +207,7 @@ public:
subexpressions[1] = NULL;
subexpressions[2] = NULL;
primary_expression.identifier = (char *) identifier;
+ this->non_lvalue_description = NULL;
}
static const char *operator_string(enum ast_operators op);
@@ -234,6 +235,18 @@ public:
* \c ast_function_call
*/
exec_list expressions;
+
+ /**
+ * For things that can't be l-values, this describes what it is.
+ *
+ * This text is used by the code that generates IR for assignments to
+ * detect and emit useful messages for assignments to some things that
+ * can't be l-values. For example, pre- or post-incerement expressions.
+ *
+ * \note
+ * This pointer may be \c NULL.
+ */
+ const char *non_lvalue_description;
};
class ast_expression_bin : public ast_expression {