X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2FSDCCast.h;h=24cc4f7aebcc29d398935c85631509a14392eaa5;hb=db452f31f22e0f21c1da062d228355aefdb5dede;hp=9865bb297e1c9fbe8cfcd3cd273c964460ba1002;hpb=cfacc9043f84988c742792b7907cb74f670589f1;p=fw%2Fsdcc diff --git a/src/SDCCast.h b/src/SDCCast.h index 9865bb29..24cc4f7a 100644 --- a/src/SDCCast.h +++ b/src/SDCCast.h @@ -31,17 +31,18 @@ #include "SDCCset.h" #include "SDCCmem.h" -#define EX_OP 0 -#define EX_VALUE 1 -#define EX_LINK 2 -#define EX_STMNT 3 -#define EX_OPERAND 4 +typedef enum { + EX_OP=0, + EX_VALUE, + EX_LINK, + EX_OPERAND +} ASTTYPE; /* expression tree */ typedef struct ast { - unsigned type:3; + ASTTYPE type; unsigned decorated:1; unsigned isError:1; unsigned funcName:1; @@ -56,7 +57,6 @@ typedef struct ast value *val; /* value if type = EX_VALUE */ sym_link *lnk; /* sym_link * if type= EX_LINK */ struct operand *oprnd; /* used only for side effecting function calls */ - unsigned stmnt; /* statement if type=EX_STMNT */ unsigned op; /* operator if type= EX_OP */ } opval; @@ -178,7 +178,6 @@ extern struct memmap *GcurMemmap; ast *newAst_VALUE (value * val); ast *newAst_OP (unsigned op); ast *newAst_LINK (sym_link * val); -ast *newAst_STMNT (unsigned val); void initAst (); ast *newNode (long, ast *, ast *);