Mesa (master): glsl: Add ast_node method to set location range.
Kenneth Graunke
kwg at kemper.freedesktop.org
Sat Mar 8 09:28:37 UTC 2014
Module: Mesa
Branch: master
Commit: 5656775cf67b935bec0b1e495e17fc0b63310974
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5656775cf67b935bec0b1e495e17fc0b63310974
Author: Sir Anthony <anthony at adsorbtion.org>
Date: Wed Feb 5 21:18:10 2014 +0600
glsl: Add ast_node method to set location range.
Reviewed-by: Carl Worth <cworth at cworth.org>
---
src/glsl/ast.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 13e8408..ae70b00 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 {
More information about the mesa-commit
mailing list