mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 16:23:04 +00:00
muscle: minor refactoring
* src/muscle-tab.c (muscle_percent_define_default): Reduce the scopes.
This commit is contained in:
@@ -637,18 +637,19 @@ void
|
|||||||
muscle_percent_define_default (char const *variable, char const *value)
|
muscle_percent_define_default (char const *variable, char const *value)
|
||||||
{
|
{
|
||||||
uniqstr name = muscle_name (variable, NULL);
|
uniqstr name = muscle_name (variable, NULL);
|
||||||
uniqstr loc_name = muscle_name (variable, "loc");
|
|
||||||
uniqstr syncline_name = muscle_name (variable, "syncline");
|
|
||||||
if (!muscle_find_const (name))
|
if (!muscle_find_const (name))
|
||||||
{
|
{
|
||||||
location loc;
|
|
||||||
MUSCLE_INSERT_STRING (name, value);
|
MUSCLE_INSERT_STRING (name, value);
|
||||||
loc.start.file = loc.end.file = "<default value>";
|
{
|
||||||
loc.start.line = loc.end.line = -1;
|
uniqstr loc_name = muscle_name (variable, "loc");
|
||||||
loc.start.column = loc.end.column = -1;
|
location loc;
|
||||||
muscle_insert (loc_name, "");
|
loc.start.file = loc.end.file = "<default value>";
|
||||||
muscle_location_grow (loc_name, loc);
|
loc.start.line = loc.end.line = -1;
|
||||||
muscle_insert (syncline_name, "");
|
loc.start.column = loc.end.column = -1;
|
||||||
|
muscle_insert (loc_name, "");
|
||||||
|
muscle_location_grow (loc_name, loc);
|
||||||
|
}
|
||||||
|
muscle_insert (muscle_name (variable, "syncline"), "");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user