aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ssr/src/parsing.rs
Commit message (Collapse)AuthorAgeFilesLines
* SSR: Match paths based on what they resolve toDavid Lattimore2020-07-241-16/+1
| | | | Also render template paths appropriately for their context.
* SSR: Parse template as Rust code.David Lattimore2020-07-241-32/+28
| | | | | | This is in preparation for a subsequent commit where we add special handling for paths in the template, allowing them to be qualified differently in different contexts.
* SSR: Change the way rules are stored internally.David Lattimore2020-07-241-30/+76
| | | | | | | | | | | | | | | | | | | | | | Previously we had: - Multiple rules - Each rule had its pattern parsed as an expression, path etc This meant that there were two levels at which there could be multiple rules. Now we just have multiple rules. If a pattern can parse as more than one kind of thing, then they get stored as multiple separate rules. We also now don't have separate fields for the different kinds of things that a pattern can parse as. This makes adding new kinds of things simpler. Previously, add_search_pattern would construct a rule with a dummy replacement. Now the replacement is an Option. This is slightly cleaner and also opens the way for parsing the replacement template as the same kind of thing as the search pattern.
* SSR: Extract error code out to a separate moduleDavid Lattimore2020-07-031-14/+3
| | | | | This is to make reusing it outside of parsing easier in a subsequent change.
* SSR: Use T! instead of SyntaxKind::* where possibleDavid Lattimore2020-07-021-11/+11
|
* SSR: Add initial support for placeholder constraintsDavid Lattimore2020-07-011-5/+87
|
* Fix some typosDavid Lattimore2020-06-301-1/+1
|
* Use more of FxHash*Laurențiu Nicola2020-06-291-1/+1
|
* Allow SSR to match type references, items, paths and patternsDavid Lattimore2020-06-221-0/+272
Part of #3186