2022-04-16 09:33:54 -05:00
|
|
|
const QUERY = [
|
|
|
|
'-> "p"',
|
|
|
|
'"p",',
|
|
|
|
'"p" -> a',
|
|
|
|
'"a" -> "p"',
|
|
|
|
'->"-"',
|
|
|
|
'"a',
|
2022-04-16 18:43:26 -05:00
|
|
|
'""',
|
2022-04-16 09:33:54 -05:00
|
|
|
];
|
2021-12-20 10:45:52 -06:00
|
|
|
|
|
|
|
const PARSED = [
|
|
|
|
{
|
|
|
|
elems: [],
|
|
|
|
foundElems: 1,
|
2022-04-16 09:33:54 -05:00
|
|
|
original: '-> "p"',
|
2021-12-20 10:45:52 -06:00
|
|
|
returned: [{
|
|
|
|
name: "p",
|
|
|
|
fullPath: ["p"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "p",
|
|
|
|
generics: [],
|
2023-02-28 19:17:59 -06:00
|
|
|
typeFilter: -1,
|
2021-12-20 10:45:52 -06:00
|
|
|
}],
|
2022-04-16 09:33:54 -05:00
|
|
|
userQuery: '-> "p"',
|
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
elems: [{
|
|
|
|
name: "p",
|
|
|
|
fullPath: ["p"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "p",
|
|
|
|
generics: [],
|
2023-02-28 19:17:59 -06:00
|
|
|
typeFilter: -1,
|
2022-04-16 09:33:54 -05:00
|
|
|
}],
|
|
|
|
foundElems: 1,
|
|
|
|
original: '"p",',
|
|
|
|
returned: [],
|
|
|
|
userQuery: '"p",',
|
2021-12-20 10:45:52 -06:00
|
|
|
error: null,
|
|
|
|
},
|
2022-04-16 09:33:54 -05:00
|
|
|
{
|
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
|
|
|
original: '"p" -> a',
|
|
|
|
returned: [],
|
|
|
|
userQuery: '"p" -> a',
|
|
|
|
error: "You cannot have more than one element if you use quotes",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
|
|
|
original: '"a" -> "p"',
|
|
|
|
returned: [],
|
|
|
|
userQuery: '"a" -> "p"',
|
|
|
|
error: "Cannot have more than one literal search element",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
|
|
|
original: '->"-"',
|
|
|
|
returned: [],
|
|
|
|
userQuery: '->"-"',
|
|
|
|
error: 'Unexpected `-` in a string element',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
|
|
|
original: '"a',
|
|
|
|
returned: [],
|
|
|
|
userQuery: '"a',
|
|
|
|
error: 'Unclosed `"`',
|
|
|
|
},
|
2022-04-16 18:43:26 -05:00
|
|
|
{
|
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
|
|
|
original: '""',
|
|
|
|
returned: [],
|
|
|
|
userQuery: '""',
|
|
|
|
error: 'Cannot have empty string element',
|
|
|
|
},
|
2021-12-20 10:45:52 -06:00
|
|
|
];
|