aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/syntax_bridge.rs
Commit message (Collapse)AuthorAgeFilesLines
* clippy::redudant_borrowMaan20032021-06-131-1/+1
|
* Apply more clippy suggestions and update generatedClemens Wasser2021-06-031-3/+2
|
* Move `TokenMap` to its own fileJonas Schievink2021-05-241-80/+3
|
* Add even more docsAleksey Kladov2021-05-221-1/+1
|
* Merge #8560bors[bot]2021-04-181-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 8560: Escape characters in doc comments in macros correctly r=jonas-schievink a=ChayimFriedman2 Previously they were escaped twice, both by `.escape_default()` and the debug view of strings (`{:?}`). This leads to things like newlines or tabs in documentation comments being `\\n`, but we unescape literals only once, ending up with `\n`. This was hard to spot because CMark unescaped them (at least for `'` and `"`), but it did not do so in code blocks. This also was the root cause of #7781. This issue was solved by using `.escape_debug()` instead of `.escape_default()`, but the real issue remained. We can bring the `.escape_default()` back by now, however I didn't do it because it is probably slower than `.escape_debug()` (more work to do), and also in order to change the code the least. Example (the keyword and primitive docs are `include!()`d at https://doc.rust-lang.org/src/std/lib.rs.html#570-578, and thus originate from macro): Before: ![image](https://user-images.githubusercontent.com/24700207/115130096-40544300-9ff5-11eb-847b-969e7034e8a4.png) After: ![image](https://user-images.githubusercontent.com/24700207/115130143-9cb76280-9ff5-11eb-9281-323746089440.png) Co-authored-by: Chayim Refael Friedman <[email protected]>
| * Escape characters in doc comments in macros correctlyChayim Refael Friedman2021-04-181-1/+1
| | | | | | | | | | | | | | | | | | Previously they were escaped twice, both by `.escape_default()` and the debug view of strings (`{:?}`). This leads to things like newlines or tabs in documentation comments being `\\n`, but we unescape literals only once, ending up with `\n`. This was hard to spot because CMark unescaped them (at least for `'` and `"`), but it did not do so in code blocks. This also was the root cause of #7781. This issue was solved by using `.escape_debug()` instead of `.escape_default()`, but the real issue remained. We can bring the `.escape_default()` back by now, however I didn't do it because it is probably slower than `.escape_debug()` (more work to do), and also in order to change the code the least.
* | Make `ast_to_token_tree` infallibleJonas Schievink2021-04-041-10/+10
| | | | | | | | It could never return `None`, so reflect that in the return type
* | Allow include! an empty content fileEdwin Cheng2021-04-031-3/+0
|/
* a lot of clippy::style fixesMatthias Krüger2021-03-211-1/+1
|
* Make bare underscore token an Ident rather than Punct in proc-macroKevin Mehall2021-03-201-2/+5
|
* avoid converting types into themselves via .into() (clippy::useless-conversion)Matthias Krüger2021-03-171-2/+2
| | | | example: let x: String = String::from("hello world").into();
* some clippy::performance fixesMatthias Krüger2021-03-151-6/+2
| | | | | | | use vec![] instead of Vec::new() + push() avoid redundant clones use chars instead of &str for single char patterns in ends_with() and starts_with() allocate some Vecs with capacity to avoid unneccessary resizing
* Fix non-latin characters doc comment for mbeEdwin Cheng2021-02-281-1/+1
|
* Fix builtin macros split exprs on commaEdwin Cheng2021-02-281-1/+38
|
* :arrow_up: rowanAleksey Kladov2021-01-201-3/+1
| | | | It now stores text inline with tokens
* .Aleksey Kladov2021-01-191-1/+1
|
* Reduce TokenMap sizeEdwin Cheng2021-01-191-10/+16
|
* shrink_to_fit `TokenMap`'s backing storageJonas Schievink2021-01-181-1/+3
|
* Fixed typos in private type namesVincent Esche2021-01-091-5/+5
|
* Fixed typos in code commentsVincent Esche2021-01-091-1/+1
|
* Refactor TokenBuffer for reduc cloningEdwin Cheng2021-01-041-12/+9
|
* Reduce string copyingEdwin Cheng2021-01-041-14/+16
|
* Rollback 6929Edwin Cheng2020-12-281-2/+1
|
* mbe: treat _ as identLaurențiu Nicola2020-12-201-1/+2
|
* Node-ify lifetimesLukas Wirth2020-12-161-2/+2
|
* Bump smol_str from 0.1.16 to 0.1.17Jean SIMARD2020-09-241-1/+4
|
* Rename ra_mbe -> mbeAleksey Kladov2020-08-131-0/+832