Commit Graph

11 Commits

Author SHA1 Message Date
David Lattimore
83588a1c45 SSR: Use T! instead of SyntaxKind::* where possible 2020-07-02 09:19:58 +10:00
David Lattimore
3d9997889b SSR: Add initial support for placeholder constraints 2020-07-01 18:44:11 +10:00
David Lattimore
95f8310514 Structured search debugging 2020-07-01 16:50:45 +10:00
David Lattimore
ef49bbeec4 Fix some typos 2020-06-30 10:43:37 +10:00
bors[bot]
e1a5bd866e
Merge #5096 #5097
5096: Fix handling of whitespace when applying SSR within macro expansions. r=matklad a=davidlattimore

I originally did replacement by passing in the full file text. Then as some point I thought I could do without it. Turns out calling .text() on a node coming from a macro expansion isn't a great idea, especially when you then try and use ranges from the original source to cut that text. The test I added here actually panics without the rest of this change (sorry I didn't notice sooner).

5097: Fix SSR prompt following #4919 r=matklad a=davidlattimore



Co-authored-by: David Lattimore <dml@google.com>
2020-06-29 16:03:10 +00:00
Laurențiu Nicola
95d67ec401 Use more of FxHash* 2020-06-29 18:07:52 +03:00
David Lattimore
64a49589e7 Fix handling of whitespace when applying SSR within macro expansions.
I originally did replacement by passing in the full file text. Then as some point I thought I could do without it. Turns out calling .text() on a node coming from a macro expansion isn't a great idea, especially when you then try and use ranges from the original source to cut that text. The test I added here actually panics without the rest of this change (sorry I didn't notice sooner).
2020-06-27 20:38:31 +10:00
David Lattimore
fc46c12e36 Fix test following change to fixture parsing (d016cb4867) 2020-06-27 11:33:00 +10:00
David Lattimore
f4dc549582 SSR: Allow matching within macro calls 2020-06-27 11:33:00 +10:00
David Lattimore
467af611fb SSR: Allow matching of whole macro calls
Matching within macro calls is to come later and matching of macro calls within macro calls later still.
2020-06-23 07:42:34 +10:00
David Lattimore
662ab2ecc8 Allow SSR to match type references, items, paths and patterns
Part of #3186
2020-06-22 21:42:55 +10:00