From: konrad Date: Mon, 15 Nov 2010 07:41:00 +0000 (+0000) Subject: fix literal parser to go through all applicable X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=d44d2f90d34ac65ea8a2b2f79e458d4d767fe5d6;p=web%2Fkonrad%2Ftaurus.git fix literal parser to go through all applicable git-svn-id: https://silmor.de/svn/softmagic/elam/trunk@629 6e3c4bff-ac9f-4ac1-96c5-d2ea494d3e33 --- diff --git a/src/elamengine.cpp b/src/elamengine.cpp index d622a3f..00a4f87 100644 --- a/src/elamengine.cpp +++ b/src/elamengine.cpp @@ -268,10 +268,16 @@ QPair< QString, QVariant > Engine::parseLiteral ( QString ex, int start) cand<parsers[i]; if(cand.size()<1) return QPair(); - //sort them + //sort them (highest prio first) qSort(cand); //execute - return cand[0].parser(ex,*this,start); + for(int i=0;ir=cand[0].parser(ex,*this,start); + if(r.first.size()>0) + return r; + } + //failure + return QPair< QString, QVariant >(); }