move typedefs to top
This commit is contained in:
parent
7028ee4369
commit
23e5342cb0
1 changed files with 12 additions and 8 deletions
20
pila.c
20
pila.c
|
@ -18,31 +18,35 @@ typedef struct UserWord UserWord;
|
|||
typedef struct Word Word;
|
||||
typedef struct DictionaryEntry DictionaryEntry;
|
||||
typedef struct RpnState RpnState;
|
||||
typedef struct Str Str;
|
||||
typedef struct Value Value;
|
||||
typedef enum ValueKind ValueKind;
|
||||
typedef enum WordKind WordKind;
|
||||
typedef void (*NativeWord)(RpnState *);
|
||||
|
||||
typedef struct {
|
||||
struct Str {
|
||||
char *s;
|
||||
isize len;
|
||||
} Str;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
enum ValueKind {
|
||||
VAL_NIL,
|
||||
VAL_INT,
|
||||
VAL_STR,
|
||||
} ValueKind;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
struct Value {
|
||||
ValueKind kind;
|
||||
union {
|
||||
u64 intn;
|
||||
Str str;
|
||||
};
|
||||
} Value;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
enum WordKind {
|
||||
WORD_NATIVE,
|
||||
WORD_USER,
|
||||
} WordKind;
|
||||
};
|
||||
|
||||
struct UserWord {
|
||||
Word **words;
|
||||
|
|
Loading…
Add table
Reference in a new issue