summaryrefslogtreecommitdiff
path: root/src/glsl/ast.h
diff options
context:
space:
mode:
authorSir Anthony <anthony@adsorbtion.org>2014-02-05 21:18:09 +0600
committerKenneth Graunke <kenneth@whitecape.org>2014-03-08 01:29:00 -0800
commit433d562ac6b24b5e0ff63a682316be632dfc7053 (patch)
treef6224ee03952a8ad91a95c65ffc48fcfa3ddcf45 /src/glsl/ast.h
parent6984aa43504bd9b68692872cd711af3931607576 (diff)
glsl: Extend ast location structure to hande end token position.
Reviewed-by: Carl Worth <cworth@cworth.org>
Diffstat (limited to 'src/glsl/ast.h')
-rw-r--r--src/glsl/ast.h22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
index 1efb30679bb..8820993bdaa 100644
--- a/src/glsl/ast.h
+++ b/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,21 @@ 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;
}
/**
* 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; /**< Line number within the source string. */
+ unsigned first_column; /**< Column in the line. */
+ unsigned last_line; /**< Line number within the source string. */
+ unsigned last_column; /**< Column in the line. */
} location;
exec_node link;