os-rust/tests/rustdoc-js-std/parser-filter.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

157 lines
3.7 KiB
JavaScript
Raw Normal View History

2021-12-20 17:45:52 +01:00
const PARSED = [
{
2023-06-09 16:49:38 +02:00
query: 'fn:foo',
2021-12-20 17:45:52 +01:00
elems: [{
name: "foo",
fullPath: ["foo"],
pathWithoutLast: [],
pathLast: "foo",
generics: [],
typeFilter: 7,
2021-12-20 17:45:52 +01:00
}],
foundElems: 1,
2022-01-03 16:43:30 +01:00
userQuery: "fn:foo",
returned: [],
2021-12-20 17:45:52 +01:00
error: null,
},
{
2023-06-09 16:49:38 +02:00
query: 'enum : foo',
2021-12-20 17:45:52 +01:00
elems: [{
name: "foo",
fullPath: ["foo"],
pathWithoutLast: [],
pathLast: "foo",
generics: [],
typeFilter: 6,
2021-12-20 17:45:52 +01:00
}],
foundElems: 1,
2022-01-03 16:43:30 +01:00
userQuery: "enum : foo",
returned: [],
2021-12-20 17:45:52 +01:00
error: null,
},
{
2023-06-09 16:49:38 +02:00
query: 'macro<f>:foo',
elems: [],
foundElems: 0,
2022-01-03 16:43:30 +01:00
userQuery: "macro<f>:foo",
returned: [],
2023-06-12 16:05:00 +02:00
error: "Unexpected `<` in type filter (before `:`)",
2021-12-20 17:45:52 +01:00
},
{
2023-06-09 16:49:38 +02:00
query: 'macro!',
elems: [{
name: "macro",
fullPath: ["macro"],
pathWithoutLast: [],
pathLast: "macro",
generics: [],
typeFilter: 16,
}],
foundElems: 1,
userQuery: "macro!",
returned: [],
error: null,
},
{
2023-06-09 16:49:38 +02:00
query: 'macro:mac!',
elems: [{
name: "mac",
fullPath: ["mac"],
pathWithoutLast: [],
pathLast: "mac",
generics: [],
typeFilter: 16,
}],
foundElems: 1,
userQuery: "macro:mac!",
returned: [],
error: null,
},
{
2023-06-09 16:49:38 +02:00
query: 'a::mac!',
elems: [{
name: "a::mac",
fullPath: ["a", "mac"],
pathWithoutLast: ["a"],
pathLast: "mac",
generics: [],
typeFilter: 16,
}],
foundElems: 1,
userQuery: "a::mac!",
returned: [],
error: null,
},
{
2023-06-09 16:49:38 +02:00
query: '-> fn:foo',
elems: [],
foundElems: 1,
userQuery: "-> fn:foo",
returned: [{
name: "foo",
fullPath: ["foo"],
pathWithoutLast: [],
pathLast: "foo",
generics: [],
typeFilter: 7,
}],
error: null,
},
{
2023-06-09 16:49:38 +02:00
query: '-> fn:foo<fn:bar>',
elems: [],
foundElems: 1,
userQuery: "-> fn:foo<fn:bar>",
returned: [{
name: "foo",
fullPath: ["foo"],
pathWithoutLast: [],
pathLast: "foo",
generics: [
{
name: "bar",
fullPath: ["bar"],
pathWithoutLast: [],
pathLast: "bar",
generics: [],
typeFilter: 7,
}
],
typeFilter: 7,
}],
error: null,
},
{
2023-06-09 16:49:38 +02:00
query: '-> fn:foo<fn:bar, enum : baz::fuzz>',
elems: [],
foundElems: 1,
userQuery: "-> fn:foo<fn:bar, enum : baz::fuzz>",
returned: [{
name: "foo",
fullPath: ["foo"],
pathWithoutLast: [],
pathLast: "foo",
generics: [
{
name: "bar",
fullPath: ["bar"],
pathWithoutLast: [],
pathLast: "bar",
generics: [],
typeFilter: 7,
},
{
name: "baz::fuzz",
fullPath: ["baz", "fuzz"],
pathWithoutLast: ["baz"],
pathLast: "fuzz",
generics: [],
typeFilter: 6,
},
],
typeFilter: 7,
}],
error: null,
},
2021-12-20 17:45:52 +01:00
];