first step for decl

--HG--
branch : faluco
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/faluco%409
This commit is contained in:
Borja Ferrer 2006-07-14 02:39:00 +00:00
parent a3cc0fa6ba
commit cb1b5aee35
2 changed files with 9 additions and 1 deletions

View File

@ -332,7 +332,7 @@ typedef struct s_stringpair {
#define tDECL 299
#define tOPERATOR 300
#define tPUBLIC 301
#define tRETURN 303
#define tRETURN 302
#define tSIZEOF 303
#define tSLEEP 304
#define tSTATE 305

View File

@ -4591,6 +4591,14 @@ static void statement(int *lastindent,int allow_decl)
error(3); /* declaration only valid in a block */
} /* if */
break;
case tDECL:
if (allow_decl) {
declloc(FALSE);
lastst=tDECL;
} else {
error(3); /* declaration only valid in a block */
} /* if */
break;
case tSTATIC:
if (allow_decl) {
declloc(TRUE);