%token INTERFACE_UPRAGMA SPECIALISE_UPRAGMA
%token INLINE_UPRAGMA MAGIC_UNFOLDING_UPRAGMA
-%token DEFOREST_UPRAGMA END_UPRAGMA
+%token DEFOREST_UPRAGMA END_UPRAGMA
+%token SOURCE_UPRAGMA
/**********************************************************************
* *
%type <uentid> export import
-%type <ulong> commas
+%type <ulong> commas importkey
/**********************************************************************
* *
impdecl : importkey modid impspec
- { $$ = lsing(mkimport($2,0,mknothing(),$3,startlineno)); }
+ { $$ = lsing(mkimport($2,0,mknothing(),$3,$1,startlineno)); }
| importkey QUALIFIED modid impspec
- { $$ = lsing(mkimport($3,1,mknothing(),$4,startlineno)); }
+ { $$ = lsing(mkimport($3,1,mknothing(),$4,$1,startlineno)); }
| importkey QUALIFIED modid AS modid impspec
- { $$ = lsing(mkimport($3,1,mkjust($5),$6,startlineno)); }
+ { $$ = lsing(mkimport($3,1,mkjust($5),$6,$1,startlineno)); }
;
impspec : /* empty */ { $$ = mknothing(); }
}
;
-topdecl : typed { $$ = $1; }
- | datad { $$ = $1; }
- | newtd { $$ = $1; }
- | classd { $$ = $1; }
- | instd { $$ = $1; }
- | defaultd { $$ = $1; }
+topdecl : typed { $$ = $1; FN = NULL; SAMEFN = 0; }
+ | datad { $$ = $1; FN = NULL; SAMEFN = 0; }
+ | newtd { $$ = $1; FN = NULL; SAMEFN = 0; }
+ | classd { $$ = $1; FN = NULL; SAMEFN = 0; }
+ | instd { $$ = $1; FN = NULL; SAMEFN = 0; }
+ | defaultd { $$ = $1; FN = NULL; SAMEFN = 0; }
| decl { $$ = $1; }
;
* *
**********************************************************************/
-importkey: IMPORT { setstartlineno(); }
+importkey: IMPORT { setstartlineno(); $$ = 0; }
+ | IMPORT SOURCE_UPRAGMA { setstartlineno(); $$ = 1; }
;
datakey : DATA { setstartlineno();