Added symbol to list of valid primary expressions
authorLukas Krickl <lukas@krickl.dev>
Mon, 20 Nov 2023 06:54:43 +0000 (07:54 +0100)
committerLukas Krickl <lukas@krickl.dev>
Mon, 20 Nov 2023 06:54:43 +0000 (07:54 +0100)
src/ulas.c

index c5b99a201e9353c88954603b1c2f44ff534e29c7..b4b9d2daf7abb555c70827a0ec1f1fb378f9836b 100644 (file)
@@ -1045,8 +1045,7 @@ end:
 
 int ulas_parseprim(int *i) {
   struct ulas_tok *t = ulas_tokbufget(&ulas.toks, *i);
-  if (!t || (t->type != ULAS_INT && t->type != ULAS_STR)) {
-    printf("got type %d %c expected %d\n", t->type, t->type, ULAS_INT);
+  if (!t || (t->type != ULAS_INT && t->type != ULAS_STR && t->type != ULAS_SYMBOL)) {
     ULASERR("Primary expression expected\n");
     return -1;
   }