Improve the BNF description a bit and fix some issues

This commit is contained in:
Guillaume Gomez
2022-03-28 16:14:00 +02:00
parent 1f5c4c2b30
commit da829d8d9d
5 changed files with 201 additions and 40 deletions

View File

@@ -1,7 +1,7 @@
// This test is mostly to check that the parser still kinda outputs something
// (and doesn't enter an infinite loop!) even though the query is completely
// invalid.
const QUERY = ['a b', 'a b', 'a,b(c)'];
const QUERY = ['a b', 'a b', 'a,b(c)', 'aaa,a'];
const PARSED = [
{
@@ -61,4 +61,28 @@ const PARSED = [
userQuery: "a,b(c)",
error: "Unexpected `(`",
},
{
elems: [
{
name: "aaa",
fullPath: ["aaa"],
pathWithoutLast: [],
pathLast: "aaa",
generics: [],
},
{
name: "a",
fullPath: ["a"],
pathWithoutLast: [],
pathLast: "a",
generics: [],
},
],
foundElems: 2,
original: "aaa,a",
returned: [],
typeFilter: -1,
userQuery: "aaa,a",
error: null,
},
];