Commit graph

206 commits

Author SHA1 Message Date
Aleksey Kladov
5f8b37563e Cleanup editing API 2020-02-29 13:51:23 +01:00
Veetaha
5f15e3aeb0
ra_mbe: Remove explicit type annotation 2020-02-22 13:14:46 +02:00
Veetaha
28bdb65407 ra_mbe: added test for malformed token in macro invokation
There was a panic where lexer returned None on malformed tokens.
But now we just ignore tokenization errors in mbe.
2020-02-22 13:10:54 +02:00
Veetaha
93a19bda17 ra_mbe: convert_literal now works with malformed tokens 2020-02-22 13:10:54 +02:00
Shotaro Yamada
d06733efeb Cleanup 2020-02-19 13:36:59 +09:00
Kirill Bulatov
f6816c253b Update versions 2020-02-18 16:12:40 +02:00
Kirill Bulatov
eceaf94f19 More manual clippy fixes 2020-02-18 16:12:37 +02:00
Kirill Bulatov
b8ddcb0652 Run cargo +nightly fix --clippy -Z unstable-options 2020-02-18 16:03:08 +02:00
Veetaha
9e7eaa959f ra_syntax: refactored the lexer design as per @matklad and @kiljacken PR review 2020-02-04 00:00:55 +02:00
Veetaha
ac37a11f04 Reimplemented lexer with vectors instead of iterators 2020-02-04 00:00:55 +02:00
Vincent Rouillé
dc98930965
Add details about test_repeat_bad_var current state 2019-12-30 17:12:20 +01:00
Vincent Rouillé
c670a15345
Details about macro NestingState hit and at_end fields 2019-12-30 17:09:07 +01:00
Vincent Rouillé
6d84dee4e7
fix #2520: change expand_repeat loop stop condition 2019-12-28 22:48:49 +01:00
kjeremy
0d5d63a80e Clippy lints 2019-12-20 15:14:30 -05:00
Aleksey Kladov
6edc54a1e6 Refactor macro tests 2019-12-19 16:23:23 +01:00
Aleksey Kladov
5c3c2b8690 Fix parsing of interpolated expressions 2019-12-19 14:43:19 +01:00
Edwin Cheng
41544a4088 Refactoring 2019-12-18 13:10:37 +08:00
Edwin Cheng
2ea1cfd780 Rename range to by_kind 2019-12-18 11:36:10 +08:00
Edwin Cheng
e16f3a5ee2 Add test for token map 2019-12-18 11:20:23 +08:00
Edwin Cheng
325532d119 Fix shift id for delim and other tokens 2019-12-18 11:20:23 +08:00
Edwin Cheng
320416d756 Add TokenTextRange 2019-12-18 11:20:22 +08:00
Edwin Cheng
59295854f8 Add token id to delims 2019-12-18 11:20:22 +08:00
Edwin Cheng
aceb9d7fb0 Add token ids for all tt::Leaf 2019-12-18 11:20:22 +08:00
Edwin Cheng
b53587c7bd Re-export Origin to replace ExpansionOrigin 2019-12-15 01:46:39 +08:00
Edwin Cheng
98f98cbb54 Refactor tt::Delimiter 2019-12-13 21:53:34 +08:00
Florian Diebold
ab4ecca210 Don't wrap most syntax trees in invisible delimiters when converting to token tree
Otherwise parsing them again doesn't work.
2019-12-05 19:29:39 +01:00
Florian Diebold
18f6a995d0 Add expansion infrastructure for derive macros 2019-12-05 17:23:09 +01:00
Edwin Cheng
bf537eefb5 Fixed mbe trival subtree 2019-11-22 01:02:07 +08:00
Aleksey Kladov
2b6f1ab0e2 Collapse TokenMap and RevTokenMap 2019-11-18 16:08:41 +03:00
Aleksey Kladov
b79d678923 Token-based reverse-mapping 2019-11-18 15:08:39 +03:00
Aleksey Kladov
fd52d721e1 More correct expansion mapping
We can't really map arbitrary ranges, we only can map tokens
2019-11-17 20:15:55 +03:00
Aleksey Kladov
c8f858d043 Make shift an implementation detail of mbe 2019-11-17 19:11:43 +03:00
Aleksey Kladov
7e2f4b30db Disable doctests 2019-11-17 18:35:05 +03:00
Aleksey Kladov
2eaa8c94a8 Goto definition works inside macros 2019-11-16 17:00:54 +03:00
memoryruins
5476c4faa3 Update smallvec dep to 1.0 2019-11-15 07:18:10 -05:00
Aleksey Kladov
70f2a21b55 Remove typed macro parsing API
We do type-erasure on every path anyway, so it doesn't make much sense
to duplicate this function for every type
2019-11-09 13:14:10 +03:00
Edwin Cheng
0a5ec69404 Remove map_ranges in RevTokenMap 2019-11-09 12:00:46 +08:00
Edwin Cheng
d01e0abdb5 Refactor and simpfily 2019-11-09 04:26:28 +08:00
Edwin Cheng
62ed93db13 Refactor and add more comments 2019-11-08 10:19:41 +08:00
Edwin Cheng
568f3cff41 Fix formatting 2019-11-05 09:43:59 +08:00
Edwin Cheng
2a76bb5a0b Refactor a bit 2019-11-05 03:20:54 +08:00
Edwin Cheng
604bdc6ffe Use macro_rules shift to map text ranges 2019-11-05 02:09:16 +08:00
Edwin Cheng
e6709f64af Rename and fix typos 2019-11-05 01:38:20 +08:00
Edwin Cheng
67226ebc82 Remove dbg! 2019-11-05 01:38:20 +08:00
Edwin Cheng
d560219d06 Fixed bug in ExpandedRangeMap 2019-11-05 01:38:20 +08:00
Edwin Cheng
159da285e9 Add macro_expansion_info in hir_expand 2019-11-05 01:38:20 +08:00
Edwin Cheng
9fd546bec2 Add map_id to TokenId 2019-11-05 01:38:20 +08:00
Edwin Cheng
a5839662f4 Change to add 1 if non zero shift 2019-11-05 01:16:06 +08:00
Edwin Cheng
188a1412b9 Refactor and rename 2019-11-05 01:01:05 +08:00
Edwin Cheng
42661a3b27 Change Option<u32> to u32 for shift value 2019-11-05 00:33:19 +08:00