-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Create real parser for search queries #90630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bors
merged 28 commits into
rust-lang:master
from
GuillaumeGomez:improve-rustdoc-search
Apr 21, 2022
Merged
Changes from 27 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
be41750
Greatly improve rustdoc search
GuillaumeGomez 3aeef67
Update search engine and parser to error when quotes are used on quer…
GuillaumeGomez 0f51652
Update tests
GuillaumeGomez 7cefee0
Add possibility to check parsed query
GuillaumeGomez f5833e7
Add parser tests
GuillaumeGomez bbcf176
Improve naming of "val" field
GuillaumeGomez 51de26c
* If type filter is in quotes, throw an error.
GuillaumeGomez 99c5394
Add query syntax for the parser
GuillaumeGomez 264064d
* Greatly improve the rustdoc search parser source code
GuillaumeGomez 99d5520
Make query parser more strict and improve display of errors
GuillaumeGomez 4929733
Simplify parser syntax
GuillaumeGomez c7de1a1
Improve documentation and add some explanations in the code
GuillaumeGomez 699ae36
Apply suggestions:
GuillaumeGomez f9251ee
Replace unneeded use of regex with a simple if
GuillaumeGomez 8e29ed4
Add isIdentCharacter function to ensure that unexpected characters ar…
GuillaumeGomez 1f5c4c2
Forbid rustdoc search query to end with ->
GuillaumeGomez da829d8
Improve the BNF description a bit and fix some issues
GuillaumeGomez e03a950
Handle separators in their own functions and fix missing handling of …
GuillaumeGomez 51b4005
Update the eBNF to allow generics bracket to not be closed if it's EOF
GuillaumeGomez ab9cf32
Add tests for paths
GuillaumeGomez a6051c7
Remove unnecessary `elem.name.length === 0` since the rustdoc search …
GuillaumeGomez 6f35475
Parse idents the same way in both quote string elements and "normal" …
GuillaumeGomez da363b2
Add more tests for quote errors
GuillaumeGomez d7d538a
Fix some corner cases
GuillaumeGomez 299e8ee
Add an extra check over filter type
GuillaumeGomez 5c6c1e1
Add test to ensure that keywords in path are working
GuillaumeGomez 8d0e10c
Correctly handle single `:`
GuillaumeGomez 4d26bde
Extend `handleSingleArg` documentation
GuillaumeGomez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.