Improve the change to allow parsing 9%a
If there was a later syntax error, this could incorrectly get reported as: Error: Unknown directive '%a'.
This commit is contained in:
parent
8f54f6180a
commit
8cd2cfa9d1
3 changed files with 24 additions and 3 deletions
|
|
@ -573,6 +573,9 @@ int yylex(void) {
|
|||
scanner_init();
|
||||
}
|
||||
|
||||
Delete(cparse_unknown_directive);
|
||||
cparse_unknown_directive = NULL;
|
||||
|
||||
if (next_token) {
|
||||
l = next_token;
|
||||
next_token = 0;
|
||||
|
|
@ -951,9 +954,6 @@ int yylex(void) {
|
|||
return (yylex());
|
||||
|
||||
} else {
|
||||
Delete(cparse_unknown_directive);
|
||||
cparse_unknown_directive = NULL;
|
||||
|
||||
/* SWIG directives */
|
||||
if (strcmp(yytext, "%module") == 0)
|
||||
return (MODULE);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue