Refactored; added state property to command struct to notate where in the lifecycle of command processing that the command is.
This commit is contained in:
parent
9475552be4
commit
5f4df123b4
3 changed files with 107 additions and 82 deletions
5
advent.h
5
advent.h
|
@ -196,11 +196,14 @@ typedef struct {
|
|||
word_type_t type;
|
||||
} command_word_t;
|
||||
|
||||
typedef enum {EMPTY, RAW, TOKENIZED, GIVEN, PREPROCESSED, PROCESSING, EXECUTED} command_state_t;
|
||||
|
||||
typedef struct {
|
||||
enum speechpart part;
|
||||
command_word_t word[2];
|
||||
verb_t verb;
|
||||
obj_t obj;
|
||||
obj_t obj;
|
||||
command_state_t state;
|
||||
} command_t;
|
||||
|
||||
extern struct game_t game;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue