aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-19 21:31:24 +0200
committerlemon <lsof@mailbox.org>2022-08-19 21:35:48 +0200
commit21151f70a82f10d30b74f2965c19fab78adca430 (patch)
treebb889c22a98a080cbabd3749e6c182a8bbdca2d8 /src
parent0033af8012b910931f6ab9536634d0e8da2a1bb2 (diff)
fix tepl cache
Diffstat (limited to 'src')
-rw-r--r--src/parse.cff10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/parse.cff b/src/parse.cff
index e0fd82d..1ea05d5 100644
--- a/src/parse.cff
+++ b/src/parse.cff
@@ -893,23 +893,24 @@ fn parseexpandtepl(P *Parser, tepl *Tepl) *const Type {
let arg = &tpargs[i];
switch cache.args[i] {
case Ty ty;
+ efmt("cmp %t %t\n",ty,arg.Ty);
if ty != arg.Ty {
- break #'search;
+ continue #'search;
}
case Val tok;
let tok2 = arg.Val;
switch tok.t {
case :int;
if tok.u.int != tok2.u.int {
- break #'search;
+ continue #'search;
}
case :flo;
if tok.u.flo != tok2.u.flo {
- break #'search;
+ continue #'search;
}
case :bool;
if tok.u.bool != tok2.u.bool {
- break #'search;
+ continue #'search;
}
case else
@@ -938,6 +939,7 @@ fn parseexpandtepl(P *Parser, tepl *Tepl) *const Type {
cache.next = tepl.cache;
cache.args = tpargs;
cache.ty = ty;
+ efmt("new %s %p %t %p\n", tname, tepl, tpargs[0].Ty, tpargs[0].Ty);
tepl.cache = cache;
return ty;
}