mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 11:18:08 +02:00
Move most printing to the action in the content production.
Previously, printing was occurring all over the place. Here we document that it should all be happening at the top-level content production, and we move the printing of directive newlines. The printing of expanded macros is still happening in lower-level productions, but we plan to fix that soon.
This commit is contained in:
parent
c5e9855f13
commit
04af13539a
1 changed files with 3 additions and 4 deletions
|
|
@ -103,6 +103,7 @@ input:
|
|||
| input content
|
||||
;
|
||||
|
||||
/* We do all printing at the content level */
|
||||
content:
|
||||
IDENTIFIER {
|
||||
printf ("%s", $1);
|
||||
|
|
@ -113,7 +114,7 @@ content:
|
|||
talloc_free ($1);
|
||||
}
|
||||
| macro
|
||||
| directive_with_newline
|
||||
| directive_with_newline { printf ("\n"); }
|
||||
| NEWLINE { printf ("\n"); }
|
||||
| '(' { printf ("("); }
|
||||
| ')' { printf (")"); }
|
||||
|
|
@ -154,9 +155,7 @@ argument:
|
|||
;
|
||||
|
||||
directive_with_newline:
|
||||
directive NEWLINE {
|
||||
printf ("\n");
|
||||
}
|
||||
directive NEWLINE
|
||||
;
|
||||
|
||||
directive:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue