Guillaume Gomez
1f5c4c2b30
Forbid rustdoc search query to end with ->
2022-04-18 20:59:09 +02:00
Guillaume Gomez
8e29ed43d9
Add isIdentCharacter function to ensure that unexpected characters are handled correctly
2022-04-18 20:59:09 +02:00
Guillaume Gomez
699ae365df
Apply suggestions:
...
* Forbid generics without a path (so "<p>" is forbidden).
* Change `handleSingleArg` so that it takes `results_others`, `results_in_args` and `results_returned` as arguments instead of using the "global" variables.
* Change `createQueryElement` so that it returns the newly created element instead of taking `elems` as argument.
* Improve documentation
2022-04-18 20:59:09 +02:00
Guillaume Gomez
c7de1a16f8
Improve documentation and add some explanations in the code
2022-04-18 20:59:09 +02:00
Guillaume Gomez
49297337b4
Simplify parser syntax
2022-04-18 20:59:08 +02:00
Guillaume Gomez
99d552092c
Make query parser more strict and improve display of errors
2022-04-18 20:59:08 +02:00
Guillaume Gomez
264064df36
* Greatly improve the rustdoc search parser source code
...
* Move all functions outside parseQuery
2022-04-18 20:59:08 +02:00
Guillaume Gomez
51de26cfd9
* If type filter is in quotes, throw an error.
...
* If there are generics, don't allow to have quotes.
2022-04-18 20:59:08 +02:00
Guillaume Gomez
bbcf1762dd
Improve naming of "val" field
2022-04-18 20:59:08 +02:00
Guillaume Gomez
f5833e759e
Add parser tests
2022-04-18 20:59:08 +02:00