2023-09-23 00:27:06 +00:00
|
|
|
const PARSED = [
|
|
|
|
{
|
|
|
|
query: 'A<B=C>',
|
|
|
|
elems: [
|
|
|
|
{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "A",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["a"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "a",
|
2024-09-24 19:33:09 +00:00
|
|
|
normalizedPathLast: "a",
|
2023-09-23 00:27:06 +00:00
|
|
|
generics: [],
|
|
|
|
bindings: [
|
|
|
|
[
|
|
|
|
'b',
|
|
|
|
[
|
|
|
|
{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "C",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["c"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "c",
|
2024-09-24 19:33:09 +00:00
|
|
|
normalizedPathLast: "c",
|
2023-09-23 00:27:06 +00:00
|
|
|
generics: [],
|
|
|
|
typeFilter: -1,
|
|
|
|
},
|
|
|
|
]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
typeFilter: -1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
foundElems: 1,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: 'A<B=C>',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: 'A<B = C>',
|
|
|
|
elems: [
|
|
|
|
{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "A",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["a"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "a",
|
|
|
|
generics: [],
|
|
|
|
bindings: [
|
|
|
|
[
|
|
|
|
'b',
|
|
|
|
[{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "C",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["c"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "c",
|
|
|
|
generics: [],
|
|
|
|
typeFilter: -1,
|
|
|
|
}]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
typeFilter: -1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
foundElems: 1,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: 'A<B = C>',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: 'A<B=!>',
|
|
|
|
elems: [
|
|
|
|
{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "A",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["a"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "a",
|
|
|
|
generics: [],
|
|
|
|
bindings: [
|
|
|
|
[
|
|
|
|
'b',
|
|
|
|
[{
|
|
|
|
name: "never",
|
|
|
|
fullPath: ["never"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "never",
|
|
|
|
generics: [],
|
2023-11-20 20:37:57 +00:00
|
|
|
typeFilter: 1,
|
2023-09-23 00:27:06 +00:00
|
|
|
}]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
typeFilter: -1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
foundElems: 1,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: 'A<B=!>',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: 'A<B=[]>',
|
|
|
|
elems: [
|
|
|
|
{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "A",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["a"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "a",
|
|
|
|
generics: [],
|
|
|
|
bindings: [
|
|
|
|
[
|
|
|
|
'b',
|
|
|
|
[{
|
|
|
|
name: "[]",
|
|
|
|
fullPath: ["[]"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "[]",
|
|
|
|
generics: [],
|
2023-11-20 20:37:57 +00:00
|
|
|
typeFilter: 1,
|
2023-09-23 00:27:06 +00:00
|
|
|
}]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
typeFilter: -1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
foundElems: 1,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: 'A<B=[]>',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: 'A<B=[!]>',
|
|
|
|
elems: [
|
|
|
|
{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "A",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["a"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "a",
|
|
|
|
generics: [],
|
|
|
|
bindings: [
|
|
|
|
[
|
|
|
|
'b',
|
|
|
|
[{
|
|
|
|
name: "[]",
|
|
|
|
fullPath: ["[]"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "[]",
|
|
|
|
generics: [
|
|
|
|
{
|
|
|
|
name: "never",
|
|
|
|
fullPath: ["never"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "never",
|
|
|
|
generics: [],
|
2023-11-20 20:37:57 +00:00
|
|
|
typeFilter: 1,
|
2023-09-23 00:27:06 +00:00
|
|
|
},
|
|
|
|
],
|
2023-11-20 20:37:57 +00:00
|
|
|
typeFilter: 1,
|
2023-09-23 00:27:06 +00:00
|
|
|
}]
|
|
|
|
],
|
|
|
|
],
|
|
|
|
typeFilter: -1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
foundElems: 1,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: 'A<B=[!]>',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: 'A<B=C=>',
|
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: 'A<B=C=>',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: "Cannot write `=` twice in a binding",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: 'A<B=>',
|
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: 'A<B=>',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: "Unexpected `>` after `=`",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: 'B=C',
|
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: 'B=C',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: "Type parameter `=` must be within generics list",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: '[B=C]',
|
|
|
|
elems: [],
|
|
|
|
foundElems: 0,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: '[B=C]',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: "Type parameter `=` cannot be within slice `[]`",
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: 'A<B<X>=C>',
|
|
|
|
elems: [
|
|
|
|
{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "A",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["a"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "a",
|
|
|
|
generics: [],
|
|
|
|
bindings: [
|
|
|
|
[
|
|
|
|
'b',
|
|
|
|
[
|
|
|
|
{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "C",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["c"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "c",
|
|
|
|
generics: [],
|
|
|
|
typeFilter: -1,
|
|
|
|
},
|
|
|
|
{
|
2024-09-24 19:33:09 +00:00
|
|
|
name: "X",
|
2023-09-23 00:27:06 +00:00
|
|
|
fullPath: ["x"],
|
|
|
|
pathWithoutLast: [],
|
|
|
|
pathLast: "x",
|
|
|
|
generics: [],
|
|
|
|
typeFilter: -1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
typeFilter: -1,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
foundElems: 1,
|
2024-09-24 19:33:09 +00:00
|
|
|
userQuery: 'A<B<X>=C>',
|
2023-09-23 00:27:06 +00:00
|
|
|
returned: [],
|
|
|
|
error: null,
|
|
|
|
},
|
|
|
|
];
|