+ if (internal_flag)
+ {
+ /* Only certain directives, such as #ifdef, are permitted within
+ a routine or object definition. In older versions of Inform,
+ nearly any directive was accepted, but this was -- to quote
+ an old code comment -- "about as well-supported as Wile E.
+ Coyote one beat before the plummet-lines kick in." */
+
+ if (token_value != IFV3_CODE && token_value != IFV5_CODE
+ && token_value != IFDEF_CODE && token_value != IFNDEF_CODE
+ && token_value != IFTRUE_CODE && token_value != IFFALSE_CODE
+ && token_value != IFNOT_CODE && token_value != ENDIF_CODE
+ && token_value != MESSAGE_CODE && token_value != ORIGSOURCE_CODE
+ && token_value != TRACE_CODE) {
+ char *dirname = directives.keywords[token_value];
+ error_named("Cannot nest this directive inside a routine or object:", dirname);
+ panic_mode_error_recovery(); return FALSE;
+ }
+ }
+