commit 9dfcb0e

Devine Lu Linvega  ·  2024-04-04 04:07:56 +0000 UTC
parent 183554d
(uxnasm) Print token during nested macro error
1 files changed,  +2, -2
+2, -2
 1@@ -179,7 +179,7 @@ makemacro(char *name, FILE *f, Context *ctx)
 2 		if(c == 0xa) ctx->line++;
 3 	while(f && fread(&c, 1, 1, f)) {
 4 		if(c == 0xa) ctx->line++;
 5-		if(c == '%') return error_top("Macro nested", name);
 6+		if(c == '%') return error_asm("Macro nested");
 7 		if(c == '{') depth++;
 8 		if(c == '}' && --depth) break;
 9 		if(c == '(' && !walkcomment(f, ctx))
10@@ -212,7 +212,7 @@ static int
11 makeref(char *label, char rune, Uint16 addr, Context *ctx)
12 {
13 	Item *r;
14-	if(refs_len >= 0x1000) return error_top("References limit exceeded", label);
15+	if(refs_len >= 0x1000) return error_asm("References limit exceeded");
16 	r = &refs[refs_len++];
17 	if(label[0] == '{') {
18 		lambda_stack[lambda_ptr++] = lambda_len;