diff options
Diffstat (limited to 'lexer.c')
-rw-r--r-- | lexer.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -653,6 +653,22 @@ uint64_t lex(char *str, uint64_t address, uint16_t bline, uint8_t dbg) { } if (i) { l->tok = tokens; + token *tok = tokens; + if (tok->id == TOK_SYM && tok->next) { + symbol *s = tok->sym; + for (; tok; tok = tok->next) { + switch (tok->id) { + case TOK_HEX : + case TOK_BIN : + case TOK_DEC : + case TOK_CHAR: + case TOK_EXPR: + s->val = get_val(tok, address, 3, dbg); + tok = skip_expr(tok, dbg); + break; + } + } + } tokens = NULL; last_tok = NULL; bytecount dummy; |