aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ast.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-03-09 21:32:55 +0100
committermarha <marha@users.sourceforge.net>2014-03-09 21:32:55 +0100
commit3dd4b6420f686b0147d5b8136268cc63196e253b (patch)
tree2c81c3f7503dbcfb5b64fd95b40bb1c2204598ef /mesalib/src/glsl/ast.h
parent321c01267ae1c446f1bd22b642567fcafa016c02 (diff)
downloadvcxsrv-3dd4b6420f686b0147d5b8136268cc63196e253b.tar.gz
vcxsrv-3dd4b6420f686b0147d5b8136268cc63196e253b.tar.bz2
vcxsrv-3dd4b6420f686b0147d5b8136268cc63196e253b.zip
fontconfig mesa xserver git update 9 Mar 2014
xserver commit 1c61d38528a573caadee2468ee59ea558c822e09 fontconfig commit f8ccf379eb1092592ae0b65deb563c5491f69de9 mesa commit 897f40f25d21af678b1b67c1a68c4a6722d19983
Diffstat (limited to 'mesalib/src/glsl/ast.h')
-rw-r--r--mesalib/src/glsl/ast.h36
1 files changed, 27 insertions, 9 deletions
diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h
index 1efb30679..ae70b003c 100644
--- a/mesalib/src/glsl/ast.h
+++ b/mesalib/src/glsl/ast.h
@@ -75,10 +75,10 @@ public:
struct YYLTYPE locp;
locp.source = this->location.source;
- locp.first_line = this->location.line;
- locp.first_column = this->location.column;
- locp.last_line = locp.first_line;
- locp.last_column = locp.first_column;
+ locp.first_line = this->location.first_line;
+ locp.first_column = this->location.first_column;
+ locp.last_line = this->location.last_line;
+ locp.last_column = this->location.last_column;
return locp;
}
@@ -91,17 +91,35 @@ public:
void set_location(const struct YYLTYPE &locp)
{
this->location.source = locp.source;
- this->location.line = locp.first_line;
- this->location.column = locp.first_column;
+ this->location.first_line = locp.first_line;
+ this->location.first_column = locp.first_column;
+ this->location.last_line = locp.last_line;
+ this->location.last_column = locp.last_column;
+ }
+
+ /**
+ * 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 {
- unsigned source; /**< GLSL source number. */
- unsigned line; /**< Line number within the source string. */
- unsigned column; /**< Column in the line. */
+ unsigned source; /**< GLSL source number. */
+ unsigned first_line; /**< First line number within the source string. */
+ unsigned first_column; /**< First column in the first line. */
+ unsigned last_line; /**< Last line number within the source string. */
+ unsigned last_column; /**< Last column in the last line. */
} location;
exec_node link;