diagnostics: improve accuracy for deprecated %define variables

* src/parse-gram.y: Use the location of the whole definition to record
the location of a %define variable, instead of just the name of the
variable.
Adjust tests.
This commit is contained in:
Akim Demaille
2019-01-12 19:44:36 +01:00
parent ffe2e4aaec
commit 79e79be298
6 changed files with 95 additions and 93 deletions

View File

@@ -291,7 +291,7 @@ prologue_declaration:
}
| "%define" variable value
{
muscle_percent_define_insert ($2, @2, $3.kind, $3.chars,
muscle_percent_define_insert ($2, @$, $3.kind, $3.chars,
MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
}
| "%defines" { defines_flag = true; }