mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
glcpp: Handle missing newline at EOF.
Fixes CorrectFuncOverload.vert.
This commit is contained in:
parent
739ba06680
commit
f82d673648
1 changed files with 9 additions and 0 deletions
|
|
@ -33,6 +33,8 @@
|
|||
%option extra-type="glcpp_parser_t *"
|
||||
%option prefix="glcpp_"
|
||||
|
||||
%x DONE
|
||||
|
||||
SPACE [[:space:]]
|
||||
NONSPACE [^[:space:]]
|
||||
NEWLINE [\n]
|
||||
|
|
@ -207,6 +209,13 @@ NON_STARS_THEN_STARS [^*]*[*]+
|
|||
return NEWLINE;
|
||||
}
|
||||
|
||||
/* Handle missing newline at EOF. */
|
||||
<INITIAL><<EOF>> {
|
||||
BEGIN DONE; /* Don't keep matching this rule forever. */
|
||||
yyextra->lexing_if = 0;
|
||||
return NEWLINE;
|
||||
}
|
||||
|
||||
%%
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue