Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Merge #3513 | bors[bot] | 2020-03-09 | 1 | -1/+3 | |
|\ | | | | | | | | | | | | | | | | | | | | | 3513: Completion in macros r=matklad a=flodiebold I experimented a bit with completion in macros. It's kind of working, but there are a lot of rough edges. - I'm trying to expand the macro call with the inserted fake token. This requires some hacky additions on the HIR level to be able to do "hypothetical" expansions. There should probably be a nicer API for this, if we want to do it this way. I'm not sure whether it's worth it, because we still can't do a lot if the original macro call didn't expand in nearly the same way. E.g. if we have something like `println!("", x<|>)` the expansions will look the same and everything is fine; but in that case we could maybe have achieved the same result in a simpler way. If we have something like `m!(<|>)` where `m!()` doesn't even expand or expands to something very different, we don't really know what to do anyway. - Relatedly, there are a lot of cases where this doesn't work because either the original call or the hypothetical call doesn't expand. E.g. if we have `m!(x.<|>)` the original token tree doesn't parse as an expression; if we have `m!(match x { <|> })` the hypothetical token tree doesn't parse. It would be nice if we could have better error recovery in these cases. Co-authored-by: Florian Diebold <[email protected]> | |||||
| * | Add more tests | Florian Diebold | 2020-03-07 | 1 | -1/+3 | |
| | | ||||||
* | | Add parse_to_token_tree | Edwin Cheng | 2020-03-08 | 3 | -33/+203 | |
|/ | ||||||
* | fix regression from #3451 | Edwin Cheng | 2020-03-05 | 2 | -1/+57 | |
| | ||||||
* | Fixed whitespace bug | Edwin Cheng | 2020-03-04 | 2 | -3/+35 | |
| | ||||||
* | Fix #3436 | Edwin Cheng | 2020-03-04 | 3 | -1/+72 | |
| | ||||||
* | Fix a bug for single dollar sign macro | Edwin Cheng | 2020-03-03 | 2 | -1/+6 | |
| | ||||||
* | Cleanup editing API | Aleksey Kladov | 2020-02-29 | 1 | -1/+1 | |
| | ||||||
* | ra_mbe: Remove explicit type annotation | Veetaha | 2020-02-22 | 1 | -1/+1 | |
| | ||||||
* | ra_mbe: added test for malformed token in macro invokation | Veetaha | 2020-02-22 | 1 | -3/+21 | |
| | | | | | There was a panic where lexer returned None on malformed tokens. But now we just ignore tokenization errors in mbe. | |||||
* | ra_mbe: convert_literal now works with malformed tokens | Veetaha | 2020-02-22 | 1 | -2/+3 | |
| | ||||||
* | Cleanup | Shotaro Yamada | 2020-02-19 | 1 | -1/+1 | |
| | ||||||
* | Update versions | Kirill Bulatov | 2020-02-18 | 1 | -3/+3 | |
| | ||||||
* | More manual clippy fixes | Kirill Bulatov | 2020-02-18 | 1 | -10/+7 | |
| | ||||||
* | Run cargo +nightly fix --clippy -Z unstable-options | Kirill Bulatov | 2020-02-18 | 3 | -8/+8 | |
| | ||||||
* | ra_syntax: refactored the lexer design as per @matklad and @kiljacken PR review | Veetaha | 2020-02-03 | 1 | -3/+2 | |
| | ||||||
* | Reimplemented lexer with vectors instead of iterators | Veetaha | 2020-02-03 | 1 | -3/+5 | |
| | ||||||
* | Add details about test_repeat_bad_var current state | Vincent Rouillé | 2019-12-30 | 1 | -0/+2 | |
| | ||||||
* | Details about macro NestingState hit and at_end fields | Vincent Rouillé | 2019-12-30 | 1 | -7/+10 | |
| | ||||||
* | fix #2520: change expand_repeat loop stop condition | Vincent Rouillé | 2019-12-28 | 2 | -36/+77 | |
| | ||||||
* | Clippy lints | kjeremy | 2019-12-20 | 1 | -1/+3 | |
| | ||||||
* | Refactor macro tests | Aleksey Kladov | 2019-12-19 | 2 | -397/+282 | |
| | ||||||
* | Fix parsing of interpolated expressions | Aleksey Kladov | 2019-12-19 | 1 | -0/+18 | |
| | ||||||
* | Refactoring | Edwin Cheng | 2019-12-18 | 3 | -52/+50 | |
| | ||||||
* | Rename range to by_kind | Edwin Cheng | 2019-12-18 | 2 | -2/+2 | |
| | ||||||
* | Add test for token map | Edwin Cheng | 2019-12-18 | 1 | -0/+43 | |
| | ||||||
* | Fix shift id for delim and other tokens | Edwin Cheng | 2019-12-18 | 1 | -3/+15 | |
| | ||||||
* | Add TokenTextRange | Edwin Cheng | 2019-12-18 | 1 | -8/+33 | |
| | ||||||
* | Add token id to delims | Edwin Cheng | 2019-12-18 | 4 | -57/+113 | |
| | ||||||
* | Add token ids for all tt::Leaf | Edwin Cheng | 2019-12-18 | 3 | -24/+38 | |
| | ||||||
* | Re-export Origin to replace ExpansionOrigin | Edwin Cheng | 2019-12-14 | 1 | -0/+1 | |
| | ||||||
* | Refactor tt::Delimiter | Edwin Cheng | 2019-12-13 | 6 | -34/+32 | |
| | ||||||
* | Don't wrap most syntax trees in invisible delimiters when converting to ↵ | Florian Diebold | 2019-12-05 | 1 | -2/+8 | |
| | | | | | | token tree Otherwise parsing them again doesn't work. | |||||
* | Add expansion infrastructure for derive macros | Florian Diebold | 2019-12-05 | 1 | -12/+22 | |
| | ||||||
* | Fixed mbe trival subtree | Edwin Cheng | 2019-11-21 | 1 | -0/+68 | |
| | ||||||
* | Collapse TokenMap and RevTokenMap | Aleksey Kladov | 2019-11-18 | 2 | -112/+100 | |
| | ||||||
* | Token-based reverse-mapping | Aleksey Kladov | 2019-11-18 | 1 | -1/+5 | |
| | ||||||
* | More correct expansion mapping | Aleksey Kladov | 2019-11-17 | 1 | -4/+9 | |
| | | | | We can't really map arbitrary ranges, we only can map tokens | |||||
* | Make shift an implementation detail of mbe | Aleksey Kladov | 2019-11-17 | 1 | -38/+68 | |
| | ||||||
* | Disable doctests | Aleksey Kladov | 2019-11-17 | 1 | -1/+3 | |
| | ||||||
* | Goto definition works inside macros | Aleksey Kladov | 2019-11-16 | 1 | -0/+6 | |
| | ||||||
* | Update smallvec dep to 1.0 | memoryruins | 2019-11-15 | 1 | -1/+1 | |
| | ||||||
* | Remove typed macro parsing API | Aleksey Kladov | 2019-11-09 | 3 | -64/+75 | |
| | | | | | We do type-erasure on every path anyway, so it doesn't make much sense to duplicate this function for every type | |||||
* | Remove map_ranges in RevTokenMap | Edwin Cheng | 2019-11-09 | 1 | -31/+1 | |
| | ||||||
* | Refactor and simpfily | Edwin Cheng | 2019-11-08 | 1 | -1/+1 | |
| | ||||||
* | Refactor and add more comments | Edwin Cheng | 2019-11-08 | 1 | -50/+46 | |
| | ||||||
* | Fix formatting | Edwin Cheng | 2019-11-05 | 1 | -1/+1 | |
| | ||||||
* | Refactor a bit | Edwin Cheng | 2019-11-04 | 1 | -9/+6 | |
| | ||||||
* | Use macro_rules shift to map text ranges | Edwin Cheng | 2019-11-04 | 2 | -30/+15 | |
| | ||||||
* | Rename and fix typos | Edwin Cheng | 2019-11-04 | 1 | -9/+15 | |
| |