mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader: Use struct source_location as the Bison location type.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
committed by
Alexandre Julliard
parent
af47cc5b53
commit
f1acb3d383
@ -24,12 +24,9 @@
|
|||||||
#include "hlsl.h"
|
#include "hlsl.h"
|
||||||
#include "hlsl.tab.h"
|
#include "hlsl.tab.h"
|
||||||
|
|
||||||
#define YY_USER_ACTION \
|
static void update_location(HLSL_LTYPE *lloc);
|
||||||
do { \
|
|
||||||
hlsl_lloc.first_column = hlsl_ctx.column; \
|
#define YY_USER_ACTION update_location(&hlsl_lloc);
|
||||||
hlsl_lloc.first_line = hlsl_ctx.line_no; \
|
|
||||||
hlsl_ctx.column += yyleng; \
|
|
||||||
} while(0);
|
|
||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
@ -271,6 +268,14 @@ row_major {return KW_ROW_MAJOR; }
|
|||||||
|
|
||||||
%%
|
%%
|
||||||
|
|
||||||
|
static void update_location(HLSL_LTYPE *lloc)
|
||||||
|
{
|
||||||
|
lloc->file = hlsl_ctx.source_file;
|
||||||
|
lloc->col = hlsl_ctx.column;
|
||||||
|
lloc->line = hlsl_ctx.line_no;
|
||||||
|
hlsl_ctx.column += yyleng;
|
||||||
|
}
|
||||||
|
|
||||||
int hlsl_lexer_compile(const char *text, const char *entrypoint)
|
int hlsl_lexer_compile(const char *text, const char *entrypoint)
|
||||||
{
|
{
|
||||||
YY_BUFFER_STATE buffer;
|
YY_BUFFER_STATE buffer;
|
||||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user