Fixed issue with comments in macros, fixed by jjbliss

This commit is contained in:
Devine Lu Linvega 2024-05-10 08:15:27 -07:00
parent 3a696f8fa9
commit bb57b85f57
1 changed files with 4 additions and 4 deletions

View File

@ -184,9 +184,9 @@ makemacro(char *name, FILE *f, Context *ctx)
if(c == '%') return error_asm("Macro nested");
if(c == '{') depth++;
if(c == '}' && --depth) break;
if(c == '(' && !walkcomment(f, ctx))
return 0;
else
if(c == '(') {
if(!walkcomment(f, ctx)) return 0;
} else
*dictnext++ = c;
}
*dictnext++ = 0;
@ -409,7 +409,7 @@ main(int argc, char *argv[])
{
ptr = PAGE;
copy("on-reset", scope, 0);
if(argc == 2 && scmp(argv[1], "-v", 2)) return !printf("Uxnasm - Uxntal Assembler, 13 Apr 2024.\n");
if(argc == 2 && scmp(argv[1], "-v", 2)) return !printf("Uxnasm - Uxntal Assembler, 10 May 2024.\n");
if(argc != 3) return error_top("usage", "uxnasm [-v] input.tal output.rom");
if(!assemble(argv[1])) return 1;
if(!resolve(argv[2])) return 1;