Fixes #953 support decimals in query expressions

pull/958/head
Zef Hemel 2024-07-17 20:34:52 +02:00
parent 2a4e4874ef
commit 6286e4a8ed
4 changed files with 23 additions and 3 deletions

View File

@ -10,7 +10,7 @@ export const parser = LRParser.deserialize({
maxTerm: 85, maxTerm: 85,
skippedNodes: [0,1], skippedNodes: [0,1],
repeatNodeCount: 5, repeatNodeCount: 5,
tokenData: "=h~R!RX^$[pq$[qr%Prs%fst&Tuv&lwx&qxy'Zyz'`z{'e{|'j|}'o}!O't!O!P'y!P!Q(O!Q![*g![!]*o!^!_*t!_!`+R!`!a+`!a!b+m!b!c+z!c!},i!}#O-k#P#Q.h#S#T.m#T#U/[#U#W,i#W#X1X#X#Y,i#Y#Z1x#Z#],i#]#^5S#^#b,i#b#c6`#c#d8]#d#h,i#h#i;|#i#o,i#o#p=^#q#r=c#y#z$[$f$g$[#BY#BZ$[$IS$I_$[$I|$JO$[$JT$JU$[$KV$KW$[&FU&FV$[~$aY!Y~X^$[pq$[#y#z$[$f$g$[#BY#BZ$[$IS$I_$[$I|$JO$[$JT$JU$[$KV$KW$[&FU&FV$[R%UP!fP!_!`%XQ%^P!kQ#r#s%aQ%fO!oQ~%iTOr%frs%xs;'S%f;'S;=`%}<%lO%f~%}OU~~&QP;=`<%l%f~&YSP~OY&TZ;'S&T;'S;=`&f<%lO&T~&iP;=`<%l&T~&qO!r~~&tTOw&qwx%xx;'S&q;'S;=`'T<%lO&q~'WP;=`<%l&q~'`O!`~~'eO!a~~'jO!p~~'oO!s~~'tO!]~~'yO!g~~(OO!_~R(TW!qQOY(mZ](m^!P(m!Q#O(m#O#P)b#P;'S(m;'S;=`*a<%lO(mP(pXOY(mZ](m^!P(m!P!Q)]!Q#O(m#O#P)b#P;'S(m;'S;=`*a<%lO(mP)bOXPP)eRO;'S(m;'S;=`)n;=`O(mP)qYOY(mZ](m^!P(m!P!Q)]!Q#O(m#O#P)b#P;'S(m;'S;=`*a;=`<%l(m<%lO(mP*dP;=`<%l(m~*lPT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YR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#g,z#g#h4X#h#o,zV4`WfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#X,z#X#Y4x#Y#o,zV5RUfSWPYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#o,zV5lWfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#b,z#b#c6U#c#o,zV6_UfS|QYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#o,zV6xWfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#c,z#c#d7b#d#o,zV7iWfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#h,z#h#i8R#i#o,zV8[UfSzPYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#o,zV8uWfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#f,z#f#g9_#g#o,zV9fWfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#W,z#W#X:O#X#o,zV:VWfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#X,z#X#Y:o#Y#o,zV:vWfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#f,z#f#g;`#g#o,zV;gVfSYRpq;|}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#o,zR<PP#U#V<SR<VP#m#n<YR<_OlRV<fWfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#f,z#f#g=O#g#o,zV=VWfSYR}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#i,z#i#j4X#j#o,z~=tO!b~~=yO!e~",
tokenizers: [0, 1, 2], tokenizers: [0, 1, 2],
topRules: {"Program":[0,2]}, topRules: {"Program":[0,2]},
specialized: [{term: 10, get: (value) => spec_Identifier[value] || -1}], specialized: [{term: 10, get: (value) => spec_Identifier[value] || -1}],

View File

@ -10,7 +10,7 @@ export const parser = LRParser.deserialize({
maxTerm: 85, maxTerm: 85,
skippedNodes: [0,1], skippedN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UU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#b,z#b#c6U#c#o,zV6_USPlSUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#o,zV6xWSPUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#c,z#c#d7b#d#o,zV7iWSPUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#h,z#h#i8R#i#o,zV8[USPjQUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#o,zV8uWSPUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#f,z#f#g9_#g#o,zV9fWSPUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#W,z#W#X:O#X#o,zV:VWSPUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#X,z#X#Y:o#Y#o,zV:vWSPUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#f,z#f#g;`#g#o,zV;gVSPUUpq;|}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#o,zU<PP#U#V<SU<VP#m#n<YU<_OuUV<fWSPUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#f,z#f#g=O#g#o,zV=VWSPUU}!O,z!P!Q-e!Q![,z!c!},z#R#S,z#T#i,z#i#j4X#j#o,z~=tO!b~~=yO!c~",
tokenizers: [0, 1, 2], tokenizers: [0, 1, 2],
topRules: {"Program":[0,2]}, topRules: {"Program":[0,2]},
specialized: [{term: 6, get: (value) => spec_Identifier[value] || -1}], specialized: [{term: 6, get: (value) => spec_Identifier[value] || -1}],

View File

@ -141,7 +141,7 @@ Bool {
Order { "order by" } Order { "order by" }
Regex { "/" ( ![/\\\n\r] | "\\" _ )+ "/" } Regex { "/" ( ![/\\\n\r] | "\\" _ )+ "/" }
Number { std.digit+ } Number { std.digit+ | std.digit+ "." std.digit+ }
BooleanKW { "true" | "false" } BooleanKW { "true" | "false" }

View File

@ -436,4 +436,24 @@ Deno.test("Test query parser", () => {
filter: ["*", ["number", 1], ["-", ["number", 2]]], filter: ["*", ["number", 1], ["-", ["number", 2]]],
}, },
); );
assertEquals(
astToKvQuery(
wrapQueryParse(`page where 10.2`)!,
),
{
querySource: "page",
filter: ["number", 10.2],
},
);
assertEquals(
astToKvQuery(
wrapQueryParse(`page where 10.2 > 2.2`)!,
),
{
querySource: "page",
filter: [">", ["number", 10.2], ["number", 2.2]],
},
);
}); });