(uxnasm) Print token during nested macro error
This commit is contained in:
parent
fc7ae4301c
commit
11d32db150
|
@ -179,7 +179,7 @@ makemacro(char *name, FILE *f, Context *ctx)
|
||||||
if(c == 0xa) ctx->line++;
|
if(c == 0xa) ctx->line++;
|
||||||
while(f && fread(&c, 1, 1, f)) {
|
while(f && fread(&c, 1, 1, f)) {
|
||||||
if(c == 0xa) ctx->line++;
|
if(c == 0xa) ctx->line++;
|
||||||
if(c == '%') return error_top("Macro nested", name);
|
if(c == '%') return error_asm("Macro nested");
|
||||||
if(c == '{') depth++;
|
if(c == '{') depth++;
|
||||||
if(c == '}' && --depth) break;
|
if(c == '}' && --depth) break;
|
||||||
if(c == '(' && !walkcomment(f, ctx))
|
if(c == '(' && !walkcomment(f, ctx))
|
||||||
|
@ -212,7 +212,7 @@ static int
|
||||||
makeref(char *label, char rune, Uint16 addr, Context *ctx)
|
makeref(char *label, char rune, Uint16 addr, Context *ctx)
|
||||||
{
|
{
|
||||||
Item *r;
|
Item *r;
|
||||||
if(refs_len >= 0x1000) return error_top("References limit exceeded", label);
|
if(refs_len >= 0x1000) return error_asm("References limit exceeded");
|
||||||
r = &refs[refs_len++];
|
r = &refs[refs_len++];
|
||||||
if(label[0] == '{') {
|
if(label[0] == '{') {
|
||||||
lambda_stack[lambda_ptr++] = lambda_len;
|
lambda_stack[lambda_ptr++] = lambda_len;
|
||||||
|
|
Loading…
Reference in New Issue