Makes the behaviour of logic expressions consistent in all cases (#898)

* Returned the value of a logic expression in all cases

* Remove legacy call syntax

* Correct test

* Remove old call syntax from docs/library

* Corrected docs for call syntax

* Add null coalescing operator
pull/917/head
MrMugame 2024-07-02 19:12:40 +02:00 committed by GitHub
parent 5226c43552
commit 9ed493aa00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 26 additions and 30 deletions

View File

@ -3,16 +3,16 @@ import {LRParser} from "@lezer/lr"
const spec_Identifier = {__proto__:null,null:22, and:36, or:38, where:48, limit:52, select:66, as:70, render:74, each:76, all:78}
export const parser = LRParser.deserialize({
version: 14,
states: ",fOYQPOOOOQO'#Cc'#CcO!ZQPO'#ChOOQO'#C`'#C`Q!bQQOOOOQO'#Ck'#CkOYQPO'#ClO#lQSO'#D]OYQPO'#DVO%XQQO'#C_OOQO'#C_'#C_O&RQQO'#DhO&`QPO,59SOOQO,59S,59SO&eQPO,59UOYQPO,59sOYQPO,59sOYQPO,59sOYQPO,59uOYQPO,59XOYQPO,59XO&jQQO,59WO'SQPO'#CqO'ZQPO,59[O'`QPO'#D^O'eQPO'#ESO'mQPO,59wOOQO,59w,59wO'rQQO,59qO)uQPO,59vOYQPO'#D_O)|QPO,5:SOOQO1G.n1G.nOOQO1G.p1G.pO,UQQO1G/_O.YQQO1G/_O.gQQO1G/_O.qQQO1G/aO0xQQO1G.sO1PQQO1G.sOOQO1G.r1G.rOYQPO'#CwOOQO'#D`'#D`O1WQPO,59]OYQPO'#CsOYQPO'#CuO1_QPO'#C|O2`QPO'#DQOOQO1G.v1G.vOYQPO,59xO2kQPO'#DcO2pQPO,5:nOOQO1G/c1G/cO2xQPO1G/bOOQO1G/b1G/bO2}QQO,59yOOQO-E7]-E7]OYQPO7+${O3[QQO'#CyO3xQPO'#DoOOQO,59c,59cOOQO-E7^-E7^O4aQQO,59_O4wQQO,59aO5_QQO'#DOO5fQQO'#DOO6PQPO'#DpOOQO,59h,59hOOQO,59l,59lO6hQPO,59lO6mQ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X~P#zO!]!tOh!dXj!dXl!dXq!dXu!dX!e!dX~Ox!vO~O!]!Qi!e!Qi~P!bO|_O!_^O!gaO!h_O!i_O!j_O!k_O!l_O!m_O!n_O!o_O!p`O!q`O!r`O!saOb}yc}y!W}y!t}y!u}y!]}y!^}y!a}y!v}yh}yj}yl}yo}yq}yu}y!e}ys}y~O!]!qOh!caj!cal!caq!cau!ca!e!ca~OY!yO~O!]!tOh!daj!dal!daq!dau!da!e!da~OlW|ozYTo~",
goto: "&q!xPPP!y$UPP$mPPPP$mP$U$U$U$UPP$U%UP%XP%XP%XP%]%cP%XP%fP%XPPPP$UP$UP$U$U$U%l%r%x&O&U&[PPPP&bPPPPPP&h&kPPPPPPPPPPPPPPPPPP&nQSOSZQnQfUQmWQs_Qt`QuaQvbQwcQxdQyeQ!ZoS!^{!qQ!b!OQ!c!PS!d!Q!tQ!j!TR!n!]{YOQUW_`abcdeno{!O!P!Q!T!]!q!t{ROQUW_`abcdeno{!O!P!Q!T!]!q!tRhVT|g}Q!_{R!w!qR!p!^Q!f!QR!z!tQjVR!k!UQpZR![pQ}gR!a}Q!r!_R!x!rQ!u!fR!{!uQ!VjR!l!VQ[QR!XnR!`{R!g!QRkV",
nodeNames: "⚠ LineComment Program Expression Value Number String Bool BooleanKW Regex Identifier null List GlobalIdentifier Attribute TopLevelVal ParenthesizedExpression LogicalExpression and or QueryExpression Query TagIdentifier WhereClause where LimitClause limit OrderClause Order OrderBy OrderDirection OrderKW SelectClause select Select as RenderClause render each all PageRef UnaryExpression NotKW BinExpression InKW TernaryExpression Call Object KeyVal",
maxTerm: 84,
maxTerm: 85,
skippedNodes: [0,1],
repeatNodeCount: 5,
tokenData: "=`~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+r!c!},a!}#O-c#P#Q.`#S#T.e#T#U/S#U#W,a#W#X1P#X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R#S,i#T#o,iV8dWfSYR}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#f,i#f#g8|#g#o,iV9TWfSYR}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#W,i#W#X9m#X#o,iV9tWfSYR}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#X,i#X#Y:^#Y#o,iV:eWfSYR}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#f,i#f#g:}#g#o,iV;UVfSYRpq;k}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#o,iR;nP#U#V;qR;tP#m#n;wR;|OlRV<TWfSYR}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#f,i#f#g<m#g#o,iV<tWfSYR}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#i,i#i#j3v#j#o,i~=cO!b~~=hO!e~",
tokenizers: [0, 1, 2],
topRules: {"Program":[0,2]},
specialized: [{term: 10, get: (value) => spec_Identifier[value] || -1}],
tokenPrec: 1151
tokenPrec: 1274
})

View File

@ -3,16 +3,16 @@ import {LRParser} from "@lezer/lr"
const spec_Identifier = {__proto__:null,where:14, null:30, and:44, or:46, limit:70, select:84, as:88, render:92, each:94, all:96}
export const parser = LRParser.deserialize({
version: 14,
states: ",fOYQPOOOpQQO'#C_QOQPOOOzQQO'#DQOOQO'#D_'#D_O!{QQO,58yOzQQO'#CaOzQQO'#DOO#VQQO'#DVO$WQQO'#DZOOQO'#Ch'#ChO$cQQO'#ClOOQO'#Ce'#CeO%tQSO'#DSOOQO'#Co'#CoOzQQO'#CpO&eQPO'#C|OzQQO'#CuO(QQSO'#CdOOQO'#Cd'#CdO(zQQO'#EROOQO,59l,59lOOQO-E7]-E7]O)fQSO,58{O*PQSO,59jO*jQSO'#DXO*qQSO'#CdO+_QQO'#ESOOQO,59q,59qOOQO,59u,59uO+yQPO,59uO,OQSO'#DhO,]QPO,59WOOQO,59W,59WO,bQQO,59YOzQQO,59cOzQQO,59cOzQQO,59cOzQQO,59eOOQO'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jOV{Xs{Xu{Xz{X!O{X!W{X!]{X!c{X~P&pO!]!WOV!vXs!vXu!vXz!vX!O!vX!W!vX!c!vX~Oo!YO~O!]!ZO!^![X!a![X~P$jO!^!]O~OU!^O~O!a!eO~P$jO!c!fO~O!s!gO~O!]!hO!c!tX~O!c!jO~O!_rOViafiagialiasiauiaxiazia!Oia!Wia!]ia!eia!fia!gia!hia!iia!jia!kia!lia!mia!nia!oia!pia!qia!ria|ia!^ia!aia!sia!cia~O!a!lO~PzO!]!TOV!uas!uau!uaz!ua!O!ua!W!ua!c!ua~OU!oO~O!]!WOV!vas!vau!vaz!va!O!va!W!va!c!va~O!]!ZO!^![a!a![a~O!_rO!ntO!otO!ptOVkifkigkilkiskiukixkizki!Oki!Wki!]ki!fki!gki!hki!iki!jki!kki!lki!mki!rki|ki!^ki!aki!ski!cki~O!euO!quO~P0wO!_rOVkifkigkilkiskiukixkizki!Oki!Wki!]ki!eki!fki!gki!hki!iki!jki!kki!lki!mki!qki!rki|ki!^ki!aki!ski!cki~O!nki!oki!pki~P3OO!eki!qki~P0wO!s!tO~P$jOlsO!_rO!euO!fsO!gsO!hsO!isO!jsO!ksO!lsO!msO!ntO!otO!ptO!quO!rvOVeigeiseiueixeizei!Oei!Wei!]ei|ei!^ei!aei!sei!cei~Ofei~P5hOfyO~P5hOZ}O~O!]!hO!c!ta~O!a!xO~O!]!Sa!^!Sa!a!Sa~P$jO!]qi!cqi~P$jOlsO!_rO!euO!fsO!gsO!hsO!isO!jsO!ksO!lsO!msO!ntO!otO!ptO!quOVmyfmygmysmyumyxmyzmy!Omy!Wmy!]my!rmy|my!^my!amy!smy!cmy~Ou]lxjUYx~",
goto: "&i!wPPP!xP#OPP#S$XPP$nPPP$nP$X$X$X$XPP$X$XP$XP$X$XP$X%T#OP#OP%Z%aP#OP%dP#OPPP%j%p%v%|&SPPPP&YPPPPPPPPPPPPPPPPPPPPPPP&`&c&fQQOR|`TSPTS]R!TQgUQhVSiW!WSoZ!SQ{_Q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!rki!ski|ki!^ki!aki!tki!cki~O!euO!quO~P1QO!_rOVkifkigkilkiskiukixkizki!Oki!Wki!]ki!eki!fki!gki!hki!iki!jki!kki!lki!mki!qki!rki!ski|ki!^ki!aki!tki!cki~O!nki!oki!pki~P3[O!eki!qki~P1QOfzOlsO!_rO!euO!fsO!gsO!hsO!isO!jsO!ksO!lsO!msO!ntO!otO!ptO!quO!swO~OVkigkiskiukixkizki!Oki!Wki!]ki!rki|ki!^ki!aki!tki!cki~P5pO!t!vO~P$jOlsO!_rO!euO!fsO!gsO!hsO!isO!jsO!ksO!lsO!msO!ntO!otO!ptO!quO!swOVeigeiseiueixeizei!Oei!Wei!]ei!rei|ei!^ei!aei!tei!cei~Ofei~P8ROfzO~P8ROZ!OO~O!]!jO!c!ua~O!a!zO~O!]!Sa!^!Sa!a!Sa~P$jO!]qi!cqi~P$jOlsO!_rO!euO!fsO!gsO!hsO!isO!jsO!ksO!lsO!msO!ntO!otO!ptO!quOVmyfmygmysmyumyxmyzmy!Omy!Wmy!]my!rmy!smy|my!^my!amy!tmy!cmy~Ou]lxjUYx~",
goto: "&o!xPPP!yP#PPP#T$]PP$sPPP$sP$]$]$]$]PP$]$]P$]P$]$]P$]%Z#PP#PP%a%gP#PP%jP#PPPP%p%v%|&S&YPPPP&`PPPPPPPPPPPPPPPPPPPPPPPP&f&i&lQQOR}`TSPTS]R!UQgUQhVSiW!XSoZ!TQ|_Q!SaQ!`sQ!atQ!buQ!cvQ!dwQ!ezQ!f{Q!t![Q!w!iR!{!vycRUVWZ_astuvwz{!T!U!X![!i!vy[RUVWZ_astuvwz{!T!U!X![!i!vQ!P`R!x!jQdRR!o!URy]QkWR!r!XQTPRfTQ!]oR!u!]Q!k!PR!y!kQ!VdR!p!VQ!YkR!s!YQpZR!m!TR!Q`ReRRlW",
nodeNames: "⚠ LineComment Program Query TagIdentifier WhereClause Identifier where Expression Value Number String Bool BooleanKW Regex null List GlobalIdentifier Attribute TopLevelVal ParenthesizedExpression LogicalExpression and or QueryExpression UnaryExpression NotKW BinExpression InKW TernaryExpression Call PageRef Object KeyVal LimitClause limit OrderClause Order OrderBy OrderDirection OrderKW SelectClause select Select as RenderClause render each all",
maxTerm: 84,
maxTerm: 85,
skippedNodes: [0,1],
repeatNodeCount: 5,
tokenData: "=`~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+r!c!},a!}#O-c#P#Q.`#S#T.e#T#U/S#U#W,a#W#X1P#X#Y,a#Y#Z1p#Z#],a#]#^4z#^#b,a#b#c6W#c#d8T#d#h,a#h#i;t#i#o,a#o#p=U#q#r=Z#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$[U%UP!dQ!_!`%XS%^P!iS#r#s%aS%fO!mS~%iTOr%frs%xs;'S%f;'S;=`%}<%lO%f~%}OZ~~&QP;=`<%l%f~&YSP~OY&TZ;'S&T;'S;=`&f<%lO&T~&iP;=`<%l&T~&qO!p~~&tTOw&qwx%xx;'S&q;'S;=`'T<%lO&q~'WP;=`<%l&q~'`O!`~~'eO!a~~'jO!n~~'oO!q~~'tO!]~~'yO!e~~(OO!_~U(TW!oSOY(mZ](m^!P(m!Q#O(m#O#P)b#P;'S(m;'S;=`*a<%lO(mQ(pXOY(mZ](m^!P(m!P!Q)]!Q#O(m#O#P)b#P;'S(m;'S;=`*a<%lO(mQ)bO^QQ)eRO;'S(m;'S;=`)n;=`O(mQ)qYOY(mZ](m^!P(m!P!Q)]!Q#O(m#O#P)b#P;'S(m;'S;=`*a;=`<%l(m<%lO(mQ*dP;=`<%l(m~*lPY~!Q![*g~*tO!s~~*yP!f~!_!`*|~+RO!g~~+WP!h~#r#s+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#S,i#T#X,i#X#Y4g#Y#o,iV4pUSP]QUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#o,iV5ZWSPUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#b,i#b#c5s#c#o,iV5|USPlSUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#o,iV6gWSPUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#c,i#c#d7P#d#o,iV7WWSPUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#h,i#h#i7p#i#o,iV7yUSPjQUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#o,iV8dWSPUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#f,i#f#g8|#g#o,iV9TWSPUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#W,i#W#X9m#X#o,iV9tWSPUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#X,i#X#Y:^#Y#o,iV:eWSPUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#f,i#f#g:}#g#o,iV;UVSPUUpq;k}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#o,iU;nP#U#V;qU;tP#m#n;wU;|OuUV<TWSPUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#f,i#f#g<m#g#o,iV<tWSPUU}!O,i!P!Q-S!Q![,i!c!},i#R#S,i#T#i,i#i#j3v#j#o,i~=cO!b~~=hO!c~",
tokenizers: [0, 1, 2],
topRules: {"Program":[0,2]},
specialized: [{term: 6, get: (value) => spec_Identifier[value] || -1}],
tokenPrec: 1186
tokenPrec: 1309
})

View File

@ -99,6 +99,8 @@ BinExpression {
| Expression !mulop "%" Expression
| Expression !addop "+" Expression
| Expression !addop "-" Expression
| Expression !or "??" Expression
}
TernaryExpression {

View File

@ -18,7 +18,7 @@ Deno.test("Test template", () => {
]], "}"]],
]]]);
assertEquals(parseTemplate(`{{escapeRegexp @page.name}}`), ["Template", [
assertEquals(parseTemplate(`{{escapeRegexp(@page.name)}}`), ["Template", [
"TemplateElement",
["ExpressionDirective", ["Expression", [
"Call",

View File

@ -41,17 +41,8 @@ function processTree(tree: AST): AST {
case "TemplateElement":
return ["TemplateElement", ...(tree.slice(1) as AST[]).map(processTree)];
case "ExpressionDirective": {
let exprString = tree[2][1] as string;
const legacyCallSyntax = /^([A-Za-z]+)\s+([^(]+$)/.exec(exprString);
if (legacyCallSyntax) {
// Translates "escapeRegex @page.name" -> "escapeRegex(@page.name)"
const [_, fn, args] = legacyCallSyntax;
exprString = `${fn}(${args})`;
console.warn(
"Translated legacy function call to new syntax",
exprString,
);
}
const exprString = tree[2][1] as string;
const expressionTree = parseTreeToAST(parse(
expressionLanguage,
exprString,

View File

@ -25,7 +25,7 @@ export function evalQueryExpression(
} else if (op1Val) {
return evalQueryExpression(val[2], obj, variables, functionMap);
} else {
return false;
return op1Val;
}
}
case "or": {
@ -41,7 +41,7 @@ export function evalQueryExpression(
evalQueryExpression(val[2], obj, variables, functionMap)
);
} else if (op1Val) {
return true;
return op1Val;
} else {
return evalQueryExpression(val[2], obj, variables, functionMap);
}
@ -274,6 +274,8 @@ function evalSimpleExpression(type: string, val1: any, val2: any, val3: any) {
return val2.includes(val1);
case "?":
return val1 ? val2 : val3;
case "??":
return val1 ?? val2;
default:
throw new Error(`Unupported operator: ${type}`);
}

View File

@ -28,10 +28,11 @@ Attribute of variable: {{@page.name}}
# Function calls
* `functionName(argument1, argument2, ...)`: call function `functionName`
* `functionName`: call `functionName` without any arguments
* `functionName()` or `functionName`: call function `functionName` without arguments
## Examples
```template
contains with argument list: {{contains("FizzBuzz", "Fizz")}}
Today with argument list: {{today()}}
Today without an argument list: {{today}}
```

View File

@ -13,13 +13,13 @@ To import this library, run the {[Library: Import]} command in your SilverBullet
# Included templates
```query
template
where name =~ /^{{escapeRegexp @page.name}}\//
where name =~ /^{{escapeRegexp(@page.name)}}\//
render [[Library/Core/Query/Template]]
```
# Included utility pages
```query
page
where name =~ /^{{escapeRegexp @page.name}}\// and tags != "template"
where name =~ /^{{escapeRegexp(@page.name)}}\// and tags != "template"
render [[Library/Core/Query/Page]]
```

View File

@ -8,7 +8,7 @@ To import this library, run the {[Library: Import]} command in your SilverBullet
# Included templates
```query
page
where name =~ /^{{escapeRegexp @page.name}}\//
where name =~ /^{{escapeRegexp(@page.name)}}\//
render [[Library/Core/Query/Page]]
```