aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-09-05 23:16:30 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-09-05 23:16:30 +0200
commit4de036c93497af88641eda7bf82a8f4dbdb63c02 (patch)
tree29e9fe70ec028afe5f2455039982a0cc0d716170 /src
parent49e17701ffbfebf531c050d191b641c45466b5e4 (diff)
Don’t use yylineno
Diffstat (limited to 'src')
-rw-r--r--src/lexer.l5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lexer.l b/src/lexer.l
index 3b4a2e2..08c8da2 100644
--- a/src/lexer.l
+++ b/src/lexer.l
@@ -29,7 +29,6 @@ extern bool interactive;
extern const char *current_file;
%}
-%option yylineno
%option nodefault
%option noinput nounput noyywrap
@@ -70,8 +69,8 @@ ws [ \t]
error so that lexing/parsing doesn’t continue right after the
offending token but instead on the next line typed by the user. */
. {
- user_error("%s:%d: Unrecognized character ‘%c’",
- current_file, yylineno, *yytext);
+ user_error("%s:%d:%d: Unrecognized character ‘%c’",
+ current_file, yylloc.first_line, yylloc.first_column, *yytext);
BEGIN(error);
return YYerror;
}