style: use consistently *_loc for locations

Some members are called foo_location, others are foo_loc.  Stick to
the latter.

* src/gram.h, src/location.h, src/location.c, src/output.c,
* src/parse-gram.y, src/reader.h, src/reader.c, src/reduce.c,
* src/scan-gram.l, src/symlist.h, src/symlist.c, src/symtab.h,
* src/symtab.c:
Use _loc consistently, not _location.
This commit is contained in:
Akim Demaille
2019-05-03 08:52:26 +02:00
parent 365b4d95a4
commit 013720f0e7
15 changed files with 65 additions and 65 deletions

View File

@@ -49,7 +49,7 @@
#include "xmemdup0.h"
static int current_prec = 0;
static location current_lhs_location;
static location current_lhs_loc;
static named_ref *current_lhs_named_ref;
static symbol *current_lhs_symbol;
static symbol_class current_class = unknown_sym;
@@ -651,7 +651,7 @@ rhses.1:
%token PERCENT_EMPTY "%empty";
rhs:
%empty
{ grammar_current_rule_begin (current_lhs_symbol, current_lhs_location,
{ grammar_current_rule_begin (current_lhs_symbol, current_lhs_loc,
current_lhs_named_ref); }
| rhs symbol named_ref.opt
{ grammar_current_rule_symbol_append ($2, @2, $3); }
@@ -1050,7 +1050,7 @@ void
current_lhs (symbol *sym, location loc, named_ref *ref)
{
current_lhs_symbol = sym;
current_lhs_location = loc;
current_lhs_loc = loc;
if (sym)
symbol_location_as_lhs_set (sym, loc);
/* In order to simplify memory management, named references for lhs