added __typeof extention will return type of a variable / expression
[fw/sdcc] / src / SDCC.lex
index 447560518ff3d0164067cbf819495b8e3751ae87..b9aafd72112dabe0b186328ee83d92d0a9d5b1af 100644 (file)
@@ -171,6 +171,7 @@ struct options  save_options  ;
 "while"        { count(); return(WHILE); }
 "xdata"        { count(); TKEYWORD(XDATA); }
 "..."         { count(); return(VAR_ARGS);}
+"__typeof"     { count(); return TYPEOF;}
 {L}({L}|{D})*  { count(); return(check_type()); }
 0[xX]{H}+{IS}? { count(); yylval.val = constVal(yytext); return(CONSTANT); }
 0{D}+{IS}?     { count(); yylval.val = constVal(yytext); return(CONSTANT); }