1
Fork 0

rustdoc-search: add search query syntax Fn(T) -> U

This is implemented, in addition to the ML-style one,
because Rust does it. If we don't, we'll never hear the end of it.

This commit also refactors some duplicate parts of the parser
into a dedicated function.
This commit is contained in:
Michael Howell 2024-01-06 16:01:10 -07:00
parent 23e931fd07
commit 7b926555b7
6 changed files with 530 additions and 81 deletions

View file

@ -37,15 +37,6 @@ const PARSED = [
userQuery: "a b",
error: null,
},
{
query: 'a,b(c)',
elems: [],
foundElems: 0,
original: "a,b(c)",
returned: [],
userQuery: "a,b(c)",
error: "Expected `,`, `:` or `->`, found `(`",
},
{
query: 'aaa,a',
elems: [