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 Word Word;
|
||||||
typedef struct DictionaryEntry DictionaryEntry;
|
typedef struct DictionaryEntry DictionaryEntry;
|
||||||
typedef struct RpnState RpnState;
|
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 void (*NativeWord)(RpnState *);
|
||||||
|
|
||||||
typedef struct {
|
struct Str {
|
||||||
char *s;
|
char *s;
|
||||||
isize len;
|
isize len;
|
||||||
} Str;
|
};
|
||||||
|
|
||||||
typedef enum {
|
enum ValueKind {
|
||||||
VAL_NIL,
|
VAL_NIL,
|
||||||
VAL_INT,
|
VAL_INT,
|
||||||
VAL_STR,
|
VAL_STR,
|
||||||
} ValueKind;
|
};
|
||||||
|
|
||||||
typedef struct {
|
struct Value {
|
||||||
ValueKind kind;
|
ValueKind kind;
|
||||||
union {
|
union {
|
||||||
u64 intn;
|
u64 intn;
|
||||||
Str str;
|
Str str;
|
||||||
};
|
};
|
||||||
} Value;
|
};
|
||||||
|
|
||||||
typedef enum {
|
enum WordKind {
|
||||||
WORD_NATIVE,
|
WORD_NATIVE,
|
||||||
WORD_USER,
|
WORD_USER,
|
||||||
} WordKind;
|
};
|
||||||
|
|
||||||
struct UserWord {
|
struct UserWord {
|
||||||
Word **words;
|
Word **words;
|
||||||
|
|
Loading…
Add table
Reference in a new issue