pike.git
/
src
/
program.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/program.c:5167:
struct program *p; struct identifier *i; INT32 numid=-1, offset=0; if(!n) { yyerror("Unable to inherit"); return; }
+
if ((n->token == F_APPLY) && (CAR(n)->token == F_CONSTANT) &&
+
(TYPEOF(CAR(n)->u.sval) == T_FUNCTION) &&
+
(SUBTYPEOF(CAR(n)->u.sval) == FUNCTION_BUILTIN) &&
+
(CAR(n)->u.sval.u.efun->function == debug_f_aggregate)) {
+
/* Disambiguate multiple inherit ::-reference. */
+
node *arg;
+
while(1) {
+
while ((arg = CDR(n))) {
+
n = arg;
+
if (n->token != F_ARG_LIST) goto found;
+
}
+
/* Paranoia. */
+
if ((arg = CAR(n))) {
+
n = arg;
+
continue;
+
}
+
/* FIXME: Ought to go up a level and try the car there...
+
* But as this code probably won't be reached, we
+
* just fail.
+
*/
+
yyerror("Unable to inherit");
+
return;
+
}
+
found:
+
/* NB: The traditional C grammar requires a statement after a label. */
+
;
+
}
+
fix_type_field(n); if (!pike_types_le(n->type, inheritable_type_string) && (THIS_COMPILATION->lex.pragmas & ID_STRICT_TYPES)) { yytype_report(REPORT_WARNING, n->current_file, n->line_number, inheritable_type_string, n->current_file, n->line_number, n->type, 0, "Program required for inherit.\n"); }