summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSir Anthony <[email protected]>2014-02-05 21:18:10 +0600
committerKenneth Graunke <[email protected]>2014-03-08 01:29:00 -0800
commit5656775cf67b935bec0b1e495e17fc0b63310974 (patch)
treee2c4b1c6d69e639d89ff735505719ed84a0dc584
parent654ee41cd3beb3e6e7206c805c9879fe394e4b20 (diff)
glsl: Add ast_node method to set location range.
Reviewed-by: Carl Worth <[email protected]>
-rw-r--r--src/glsl/ast.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 13e8408f96f..ae70b003cfe 100644
--- a/src/glsl/ast.h
+++ b/src/glsl/ast.h
@@ -98,6 +98,20 @@ public:
}
/**
+ * Set the source location range of an AST node using two location nodes
+ *
+ * \sa ast_node::set_location
+ */
+ void set_location_range(const struct YYLTYPE &begin, const struct YYLTYPE &end)
+ {
+ this->location.source = begin.source;
+ this->location.first_line = begin.first_line;
+ this->location.last_line = end.last_line;
+ this->location.first_column = begin.first_column;
+ this->location.last_column = end.last_column;
+ }
+
+ /**
* Source location of the AST node.
*/
struct {