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:
Zebediah Figura
2021-02-04 16:33:52 -06:00
committed by Alexandre Julliard
parent af47cc5b53
commit f1acb3d383
2 changed files with 104 additions and 124 deletions

View File

@ -24,12 +24,9 @@
#include "hlsl.h"
#include "hlsl.tab.h"
#define YY_USER_ACTION \
do { \
hlsl_lloc.first_column = hlsl_ctx.column; \
hlsl_lloc.first_line = hlsl_ctx.line_no; \
hlsl_ctx.column += yyleng; \
} while(0);
static void update_location(HLSL_LTYPE *lloc);
#define YY_USER_ACTION update_location(&hlsl_lloc);
%}
@ -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)
{
YY_BUFFER_STATE buffer;

File diff suppressed because it is too large Load Diff