From 471888b5581307d827c3ecc55a38e9accb788756 Mon Sep 17 00:00:00 2001 From: phantamanta44 Date: Sun, 14 Mar 2021 11:41:42 -0500 Subject: [PATCH] Adv item search: make prop/func resolution case-insensitive --- expr_parser.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/expr_parser.js b/expr_parser.js index 6e47058..13f0a07 100644 --- a/expr_parser.js +++ b/expr_parser.js @@ -755,13 +755,13 @@ const ExprParser = (function() { case 2: return new StrLitTerm(ast.children[0].token.value); case 3: - const fn = builtInFuncs[ast.children[0].token.id]; + const fn = builtInFuncs[ast.children[0].token.id.toLowerCase()]; if (!fn) { throw new Error(`Unknown function: ${ast.children[0].token.id}`); } return new FnCallTerm(fn, trans(ast.children[2])); case 4: { - const prop = builtInProps[ast.children[0].token.id]; + const prop = builtInProps[ast.children[0].token.id.toLowerCase()]; if (!prop) { throw new Error(`Unknown property: ${ast.children[0].token.id}`); }