rust/tests/rustdoc-js-std/parser-generics.js

63 lines
1.5 KiB
JavaScript
Raw Normal View History

const QUERY = ['A<B<C<D>, E>', 'p<> u8', '"p"<a>'];
2021-12-20 10:45:52 -06:00
const PARSED = [
{
2022-02-09 13:56:37 -06:00
elems: [],
foundElems: 0,
original: 'A<B<C<D>, E>',
2021-12-20 10:45:52 -06:00
returned: [],
userQuery: 'a<b<c<d>, e>',
2022-02-09 13:56:37 -06:00
error: 'Unexpected `<` after `<`',
},
{
elems: [
{
name: "p",
fullPath: ["p"],
pathWithoutLast: [],
pathLast: "p",
generics: [],
typeFilter: -1,
},
{
name: "u8",
fullPath: ["u8"],
pathWithoutLast: [],
pathLast: "u8",
generics: [],
typeFilter: -1,
},
],
foundElems: 2,
original: "p<> u8",
returned: [],
userQuery: "p<> u8",
error: null,
},
{
elems: [
{
name: "p",
fullPath: ["p"],
pathWithoutLast: [],
pathLast: "p",
generics: [
{
name: "a",
fullPath: ["a"],
pathWithoutLast: [],
pathLast: "a",
generics: [],
},
],
typeFilter: -1,
},
],
foundElems: 1,
original: '"p"<a>',
returned: [],
userQuery: '"p"<a>',
error: null,
},
2021-12-20 10:45:52 -06:00
];