mirror of
https://github.com/cc65/cc65.git
synced 2025-08-13 08:25:28 +00:00
Minor clean-ups and typo fixes.
This commit is contained in:
@@ -49,21 +49,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
|
||||||
/* Data */
|
|
||||||
/*****************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Map a generator function and its attributes to a token */
|
|
||||||
typedef struct GenDesc {
|
|
||||||
token_t Tok; /* Token to map to */
|
|
||||||
unsigned Flags; /* Flags for generator function */
|
|
||||||
void (*Func) (unsigned, unsigned long); /* Generator func */
|
|
||||||
} GenDesc;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
/* Code */
|
/* Code */
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@@ -48,13 +48,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Map a generator function and its attributes to a token */
|
|
||||||
typedef struct GenDesc {
|
|
||||||
token_t Tok; /* Token to map to */
|
|
||||||
unsigned Flags; /* Flags for generator function */
|
|
||||||
void (*Func) (unsigned, unsigned long); /* Generator func */
|
|
||||||
} GenDesc;
|
|
||||||
|
|
||||||
/* Descriptors for the operations */
|
/* Descriptors for the operations */
|
||||||
static GenDesc GenPASGN = { TOK_PLUS_ASSIGN, GEN_NOPUSH, g_add };
|
static GenDesc GenPASGN = { TOK_PLUS_ASSIGN, GEN_NOPUSH, g_add };
|
||||||
static GenDesc GenSASGN = { TOK_MINUS_ASSIGN, GEN_NOPUSH, g_sub };
|
static GenDesc GenSASGN = { TOK_MINUS_ASSIGN, GEN_NOPUSH, g_sub };
|
||||||
@@ -243,7 +236,7 @@ static const GenDesc* FindGen (token_t Tok, const GenDesc* Table)
|
|||||||
/* Find a token in a generator table */
|
/* Find a token in a generator table */
|
||||||
{
|
{
|
||||||
while (Table->Tok != TOK_INVALID) {
|
while (Table->Tok != TOK_INVALID) {
|
||||||
if (Table->Tok == Tok) {
|
if ((token_t)Table->Tok == Tok) {
|
||||||
return Table;
|
return Table;
|
||||||
}
|
}
|
||||||
++Table;
|
++Table;
|
||||||
|
@@ -33,6 +33,13 @@
|
|||||||
#define GEN_COMM 0x02 /* Operator is commutative */
|
#define GEN_COMM 0x02 /* Operator is commutative */
|
||||||
#define GEN_NOFUNC 0x04 /* Not allowed for function pointers */
|
#define GEN_NOFUNC 0x04 /* Not allowed for function pointers */
|
||||||
|
|
||||||
|
/* Map a generator function and its attributes to a token */
|
||||||
|
typedef struct GenDesc {
|
||||||
|
long Tok; /* Token to map to */
|
||||||
|
unsigned Flags; /* Flags for generator function */
|
||||||
|
void (*Func) (unsigned, unsigned long); /* Generator func */
|
||||||
|
} GenDesc;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
@@ -206,7 +206,7 @@ void SwitchStatement (void)
|
|||||||
|
|
||||||
|
|
||||||
void CaseLabel (void)
|
void CaseLabel (void)
|
||||||
/* Handle a case sabel */
|
/* Handle a case label */
|
||||||
{
|
{
|
||||||
ExprDesc CaseExpr; /* Case label expression */
|
ExprDesc CaseExpr; /* Case label expression */
|
||||||
long Val; /* Case label value */
|
long Val; /* Case label value */
|
||||||
|
Reference in New Issue
Block a user