Added comment bail when expanding preproc lines
authorLukas Krickl <lukas@krickl.dev>
Fri, 29 Dec 2023 06:33:40 +0000 (07:33 +0100)
committerLukas Krickl <lukas@krickl.dev>
Fri, 29 Dec 2023 06:33:40 +0000 (07:33 +0100)
src/ulas.c

index 8123ecff05ae91b61ed618547c1ebcef3513c2c7..26b3268779376ea910017183ee50f3ef67915c8f 100644 (file)
@@ -724,6 +724,10 @@ char *ulas_preprocexpand(struct ulas_preproc *pp, const char *raw_line,
         skip_next_tok) {
       def = NULL;
       skip_next_tok = !skip_next_tok;
+    } else if (pp->tok.buf[0] == ULAS_TOK_COMMENT) {
+      // if its a comment at the end of a preproc statement
+      // just bail now
+      break;
     }
     first_tok = 0;