diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2020-08-11 12:13:21 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2020-08-11 12:13:21 -0400 |
commit | d17eb092f620d217f08ae7fb27122bb30799eaf4 (patch) | |
tree | 69cb878515c17a53947b3ff49909043044cba066 /assemble.c | |
parent | a4931b7202c60749df8aeb01c1acb7d538520041 (diff) |
- Changed the spacing format to now store the number of
spaces, and tabs before the current token.
Along with also now storing a sub-token count which
is used in case the token's secondary id is meant to
be treated as a sub-token.
- Added suppor for saving the number of blank lines
before the current tokenized line.
Diffstat (limited to 'assemble.c')
-rw-r--r-- | assemble.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -456,11 +456,21 @@ uint64_t parse_tokens(token *t, bytecount *bc, uint8_t isasm, uint64_t address, return address; } -token *make_token(uint8_t id, uint8_t type, uint64_t value, char *str, symbol *s) { +token *make_token(uint8_t id, uint8_t type, uint8_t space, uint8_t tab, uint64_t value, char *str, symbol *s) { token *new_tok = malloc(sizeof(token)); (last_tok) ? (last_tok->next = new_tok) : (tokens = new_tok); + new_tok->id = id; new_tok->type = type; + + new_tok->tab = tab; + new_tok->space = space; + + new_tok->subtab = 0; + new_tok->subspace = 0; + + new_tok->digits = 0; + if (s) { new_tok->sym = s; } else if (str[0]) { |