recognize but ignore #pragma

This commit is contained in:
ceriel 1989-03-31 11:47:12 +00:00
parent d650e927a7
commit 7a7d0e413b
3 changed files with 7 additions and 0 deletions

View file

@ -107,6 +107,11 @@ domacro()
case K_UNDEF: /* "undef" */ case K_UNDEF: /* "undef" */
do_undef(); do_undef();
break; break;
case K_PRAGMA: /* "pragma" */
/* ignore for now
*/
SkipRestOfLine();
break;
default: default:
/* invalid word seen after the '#' */ /* invalid word seen after the '#' */
lexerror("%s: unknown control", tk.tk_idf->id_text); lexerror("%s: unknown control", tk.tk_idf->id_text);

View file

@ -29,6 +29,7 @@ PRIVATE struct mkey {
{"include", K_INCLUDE}, {"include", K_INCLUDE},
{"line", K_LINE}, {"line", K_LINE},
{"undef", K_UNDEF}, {"undef", K_UNDEF},
{"pragma", K_PRAGMA},
{0, K_UNKNOWN} {0, K_UNKNOWN}
}; };

View file

@ -55,4 +55,5 @@ struct mlist {
#define K_INCLUDE 8 #define K_INCLUDE 8
#define K_LINE 9 #define K_LINE 9
#define K_UNDEF 10 #define K_UNDEF 10
#define K_PRAGMA 11
#endif NOPP #endif NOPP