summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-02-11 21:49:16 -0500
committermrb0nk500 <b0nk@b0nk.xyz>2021-02-11 21:49:16 -0500
commitac778a4d39ba6c80651ce20ce780dfe859c3dcff (patch)
treeb09e8b5d6262369267fa78fd4e2926eaa7ba8773
parentd27b3a2845ff28610edaa48eaefdde14025fe216 (diff)
Fixed a bug in the lexer.
-rw-r--r--lexer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lexer.c b/lexer.c
index 4c83517..b46396d 100644
--- a/lexer.c
+++ b/lexer.c
@@ -1035,7 +1035,7 @@ uint64_t lex(char *str, uint64_t address, uint16_t bline, uint8_t dbg) {
lex_type = TOK_EXPR;
memset(lexeme, 0, strlen(lexeme)+1);
char *tmp = &str[i];
- expr *e = parse_expr(&tmp, address, NULL, 0, delm, dbg);
+ expr *e = parse_expr(&tmp, address, NULL, 1, delm, dbg);
t = make_token(lex_type, 0, space, tab, 0, "", NULL, e);
j = tmp - &str[i];
memcpy(lexeme, &str[i], j);
@@ -1070,7 +1070,7 @@ uint64_t lex(char *str, uint64_t address, uint16_t bline, uint8_t dbg) {
memset(lexeme, 0, strlen(lexeme)+1);
do {
char *tmp = &str[i];
- expr *e = parse_expr(&tmp, address, NULL, 0, delm, dbg);
+ expr *e = parse_expr(&tmp, address, NULL, 1, delm, dbg);
t = make_token(lex_type, 0, space, tab, 0, "", NULL, e);
j = tmp - &str[i];
memcpy(lexeme, &str[i], j);
@@ -1296,7 +1296,7 @@ uint64_t lex(char *str, uint64_t address, uint16_t bline, uint8_t dbg) {
lex_type = TOK_EXPR;
memset(lexeme, 0, strlen(lexeme)+1);
char *tmp = &str[i];
- expr *e = parse_expr(&tmp, address, NULL, 0, delm, dbg);
+ expr *e = parse_expr(&tmp, address, NULL, 1, delm, dbg);
j = tmp - &str[i];
memcpy(lexeme, &str[i], j);
/*i += j;*/