/* オブジェクトのタイプ */ typedef enum objtype { objGARR = 0, /* global arrays */ objGVAR = 1, /* global (scalar) variables */ objLARR = 2, /* local arrays */ objLVAR = 3, /* local (scalar) variables (include arguments) */ objFUNC = 4 /* functions */ } ObjType; #define isLocal(obj) (obj->type & 2) #define isGlobal(obj) (!(obj->type & 2)) #define isScalar(obj) (obj->type & 1) #define isArray(obj) (!(obj->type & 5)) /* オブジェクト構造体の型 */ typedef struct object { ObjType type; /* objFUNC objGVAR objGARR objLVAR objLARR */ char *name; /* name name name name name */ int argc; /* argc */ int size; /* size size size */ int offset; /* offset offset */ struct object *scope; /* scope scope */ } *Obj;