diff options
author | marha <marha@users.sourceforge.net> | 2014-03-09 22:56:02 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-03-09 22:56:02 +0100 |
commit | 2112b7dec49833ba872bd3ebcd7288930fec0796 (patch) | |
tree | 407c80c9a70f590af2d4c3e5c14678827e189331 /mesalib/src/glsl/ast.h | |
parent | 8badbdef38ce843dc443ddee219eda4040ef2cd5 (diff) | |
parent | 3dd4b6420f686b0147d5b8136268cc63196e253b (diff) | |
download | vcxsrv-2112b7dec49833ba872bd3ebcd7288930fec0796.tar.gz vcxsrv-2112b7dec49833ba872bd3ebcd7288930fec0796.tar.bz2 vcxsrv-2112b7dec49833ba872bd3ebcd7288930fec0796.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
fontconfig mesa xserver git update 9 Mar 2014
Conflicts:
mesalib/src/mapi/glapi/glapi.h
xorg-server/hw/kdrive/ephyr/hostx.c
Diffstat (limited to 'mesalib/src/glsl/ast.h')
-rw-r--r-- | mesalib/src/glsl/ast.h | 36 |
1 files changed, 27 insertions, 9 deletions
diff --git a/mesalib/src/glsl/ast.h b/mesalib/src/glsl/ast.h index c7710e5d6..eb047e0a2 100644 --- a/mesalib/src/glsl/ast.h +++ b/mesalib/src/glsl/ast.h @@ -79,10 +79,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; } @@ -95,17 +95,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; |