From 1a0dcb2a5e715401e6180aa1a4bb00a2d5fa6854 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 4 Apr 2024 10:42:43 -0700 Subject: [PATCH] Catching wildcards --- src/modal.c | 3 +++ test.modal | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/modal.c b/src/modal.c index 2b6ab6e..3fd69c8 100644 --- a/src/modal.c +++ b/src/modal.c @@ -14,6 +14,9 @@ match(char *p, Rule *r) { char c, *a = r->a, *b = p; while((c = *a)) { + if(c == '?') { + printf("WILDCARD: %s | %s\n", p, r->a); + } if(c != *b) return 0; a++, b++; } diff --git a/test.modal b/test.modal index 71a866d..627acf3 100644 --- a/test.modal +++ b/test.modal @@ -1,5 +1,5 @@ <> (dup ?x) (?x ?x done) -<> hello bye +<> (hello ?x) (bye ?x) <> (a (b (c))) (end) -hello world \ No newline at end of file +(hello world) \ No newline at end of file