73 lines
1.6 KiB
JavaScript
73 lines
1.6 KiB
JavaScript
const PARSED = [
|
|
{
|
|
query: '-> "p"',
|
|
elems: [],
|
|
foundElems: 1,
|
|
userQuery: '-> "p"',
|
|
returned: [{
|
|
name: "p",
|
|
fullPath: ["p"],
|
|
pathWithoutLast: [],
|
|
pathLast: "p",
|
|
generics: [],
|
|
typeFilter: -1,
|
|
}],
|
|
error: null,
|
|
},
|
|
{
|
|
query: '"p",',
|
|
elems: [{
|
|
name: "p",
|
|
fullPath: ["p"],
|
|
pathWithoutLast: [],
|
|
pathLast: "p",
|
|
generics: [],
|
|
typeFilter: -1,
|
|
}],
|
|
foundElems: 1,
|
|
userQuery: '"p",',
|
|
returned: [],
|
|
error: null,
|
|
},
|
|
{
|
|
query: '"p" -> a',
|
|
elems: [],
|
|
foundElems: 0,
|
|
userQuery: '"p" -> a',
|
|
returned: [],
|
|
error: "Cannot have more than one element if you use quotes",
|
|
},
|
|
{
|
|
query: '"a" -> "p"',
|
|
elems: [],
|
|
foundElems: 0,
|
|
userQuery: '"a" -> "p"',
|
|
returned: [],
|
|
error: "Cannot have more than one literal search element",
|
|
},
|
|
{
|
|
query: '->"-"',
|
|
elems: [],
|
|
foundElems: 0,
|
|
userQuery: '->"-"',
|
|
returned: [],
|
|
error: 'Unexpected `-` in a string element',
|
|
},
|
|
{
|
|
query: '"a',
|
|
elems: [],
|
|
foundElems: 0,
|
|
userQuery: '"a',
|
|
returned: [],
|
|
error: 'Unclosed `"`',
|
|
},
|
|
{
|
|
query: '""',
|
|
elems: [],
|
|
foundElems: 0,
|
|
userQuery: '""',
|
|
returned: [],
|
|
error: 'Cannot have empty string element',
|
|
},
|
|
];
|