recognize but ignore #pragma

This commit is contained in:
ceriel 1989-03-31 10:56:53 +00:00
parent 87c1bc774b
commit d650e927a7
3 changed files with 8 additions and 0 deletions

View file

@ -116,6 +116,12 @@ domacro()
case K_UNDEF: /* "undef" */ case K_UNDEF: /* "undef" */
do_undef(); do_undef();
break; break;
case K_PRAGMA: /* "pragma" */
/* ignore for now
*/
PushBack();
skipline();
break;
default: default:
/* invalid word seen after the '#' */ /* invalid word seen after the '#' */
error("%s: unknown control", id->id_text); error("%s: unknown control", id->id_text);

View file

@ -26,6 +26,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

@ -74,3 +74,4 @@ extern char *std_alloc();
#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