mirror of
https://git.wuffs.org/MWCC
synced 2025-07-25 03:25:36 +00:00
29 lines
544 B
C
29 lines
544 B
C
#ifndef COMPILER_SWITCH_H
|
|
#define COMPILER_SWITCH_H
|
|
|
|
#include "compiler/common.h"
|
|
|
|
typedef struct SwitchCase {
|
|
struct SwitchCase *next;
|
|
CLabel *label;
|
|
CInt64 min;
|
|
CInt64 max;
|
|
} SwitchCase;
|
|
typedef struct CaseRange {
|
|
CInt64 min;
|
|
CInt64 range;
|
|
PCodeLabel *label;
|
|
} CaseRange;
|
|
|
|
typedef struct SwitchInfo {
|
|
SwitchCase *cases;
|
|
CLabel *defaultlabel;
|
|
} SwitchInfo;
|
|
|
|
extern ObjectList *switchtables;
|
|
|
|
extern void switchstatement(ENode *expr, SwitchInfo *info);
|
|
extern void dumpswitchtables(Object *funcobj);
|
|
|
|
#endif
|