mirror of
https://github.com/cc65/cc65.git
synced 2025-02-28 05:30:23 +00:00
Change mode constants for ParseDecl to an enum.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4068 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
73e2a72a2a
commit
5918306fe2
@ -507,7 +507,7 @@ static SymEntry* ParseStructDecl (const char* Name, TypeCode StructType)
|
||||
}
|
||||
|
||||
/* Get type and name of the struct field */
|
||||
ParseDecl (&Spec, &Decl, 0);
|
||||
ParseDecl (&Spec, &Decl, DM_NEED_IDENT);
|
||||
|
||||
/* Get the offset of this field */
|
||||
Offs = (StructType == T_STRUCT)? StructSize : 0;
|
||||
@ -1049,7 +1049,7 @@ static FuncDesc* ParseFuncDecl (void)
|
||||
|
||||
|
||||
|
||||
static void Declarator (const DeclSpec* Spec, Declaration* D, unsigned Mode)
|
||||
static void Declarator (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
|
||||
/* Recursively process declarators. Build a type array in reverse order. */
|
||||
{
|
||||
/* Read optional function or pointer qualifiers. These modify the
|
||||
@ -1213,7 +1213,7 @@ Type* ParseType (Type* T)
|
||||
|
||||
|
||||
|
||||
void ParseDecl (const DeclSpec* Spec, Declaration* D, unsigned Mode)
|
||||
void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode)
|
||||
/* Parse a variable, type or function declaration */
|
||||
{
|
||||
/* Initialize the Declaration struct */
|
||||
|
@ -75,9 +75,11 @@ struct Declaration {
|
||||
};
|
||||
|
||||
/* Modes for ParseDecl */
|
||||
#define DM_NEED_IDENT 0U /* We must have an identifier */
|
||||
#define DM_NO_IDENT 1U /* We won't read an identifier */
|
||||
#define DM_ACCEPT_IDENT 2U /* We will accept an id if there is one */
|
||||
typedef enum {
|
||||
DM_NEED_IDENT, /* We must have an identifier */
|
||||
DM_NO_IDENT, /* We won't read an identifier */
|
||||
DM_ACCEPT_IDENT, /* We will accept an id if there is one */
|
||||
} declmode_t;
|
||||
|
||||
|
||||
|
||||
@ -90,7 +92,7 @@ struct Declaration {
|
||||
Type* ParseType (Type* Type);
|
||||
/* Parse a complete type specification */
|
||||
|
||||
void ParseDecl (const DeclSpec* Spec, Declaration* D, unsigned Mode);
|
||||
void ParseDecl (const DeclSpec* Spec, Declaration* D, declmode_t Mode);
|
||||
/* Parse a variable, type or function declaration */
|
||||
|
||||
void ParseDeclSpec (DeclSpec* D, unsigned DefStorage, long DefType);
|
||||
|
Loading…
x
Reference in New Issue
Block a user