From 21151f70a82f10d30b74f2965c19fab78adca430 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 19 Aug 2022 21:31:24 +0200 Subject: fix tepl cache --- src/parse.cff | 10 ++++++---- 1 file 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; } -- cgit v1.2.3