summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc-js-std/parser-generics.js
blob: 0cf7f5019aa5f2053b8dd4e3168bae7caf539a28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
const QUERY = ['A<B<C<D>,  E>', 'p<> u8', '"p"<a>'];

const PARSED = [
    {
        elems: [],
        foundElems: 0,
        original: 'A<B<C<D>,  E>',
        returned: [],
        typeFilter: -1,
        userQuery: 'a<b<c<d>,  e>',
        error: 'Unexpected `<` after `<`',
    },
    {
        elems: [
            {
                name: "p",
                fullPath: ["p"],
                pathWithoutLast: [],
                pathLast: "p",
                generics: [],
            },
            {
                name: "u8",
                fullPath: ["u8"],
                pathWithoutLast: [],
                pathLast: "u8",
                generics: [],
            },
        ],
        foundElems: 2,
        original: "p<> u8",
        returned: [],
        typeFilter: -1,
        userQuery: "p<> u8",
        error: null,
    },
    {
        elems: [
            {
                name: "p",
                fullPath: ["p"],
                pathWithoutLast: [],
                pathLast: "p",
                generics: [
                    {
                        name: "a",
                        fullPath: ["a"],
                        pathWithoutLast: [],
                        pathLast: "a",
                        generics: [],
                    },
                ],
            },
        ],
        foundElems: 1,
        original: '"p"<a>',
        returned: [],
        typeFilter: -1,
        userQuery: '"p"<a>',
        error: null,
    },
];