aboutsummaryrefslogtreecommitdiff
path: root/src/as_parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/as_parser.h')
-rw-r--r--src/as_parser.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/src/as_parser.h b/src/as_parser.h
index 0c31df7..4630186 100644
--- a/src/as_parser.h
+++ b/src/as_parser.h
@@ -10,41 +10,35 @@ struct arg {
int64_t ival;
double fval;
};
-typedef struct arg * arg_t;
struct instr {
enum op op;
- arg_t arg;
+ struct arg * arg;
const char* tag_name;
};
-typedef struct instr * instr_t;
struct label {
const char* name;
};
-typedef struct label * label_t;
struct stmt {
- label_t label;
- instr_t instr;
+ struct label * label;
+ struct instr * instr;
};
-typedef struct stmt * stmt_t;
struct stmts {
- stmt_t * stmts;
+ struct stmt ** stmts;
};
-typedef struct stmts * stmts_t;
struct prog {
- stmts_t stmts;
+ struct stmts * stmts;
};
-typedef struct prog * prog_t;
-
-prog_t parse_prog(allocator_t alct, token_stream_t ts);
-stmt_t parse_stmt(allocator_t alct, token_stream_t ts);
-stmts_t parse_stmts(allocator_t alct, token_stream_t ts);
-instr_t parse_instr(allocator_t alct, token_stream_t ts);
-label_t parse_label(allocator_t alct, token_stream_t ts);
-enum op parse_op(allocator_t alct, token_stream_t ts);
+
+struct prog * parse_prog(struct allocator * alct, struct token_stream * ts);
+struct stmt * parse_stmt(struct allocator * alct, struct token_stream * ts);
+struct stmts * parse_stmts(struct allocator * alct, struct token_stream * ts);
+struct instr * parse_instr(struct allocator * alct, struct token_stream * ts);
+struct label * parse_label(struct allocator * alct, struct token_stream * ts);
+enum op parse_op(struct allocator * alct, struct token_stream * ts);
#endif