Commit Graph

33 Commits

Author SHA1 Message Date
Edwin Cheng
3dc3d9d18f Fix a bug for single dollar sign macro 2020-03-04 01:03:44 +08:00
Florian Diebold
dd6ec81d65 Add test for macro expansion in various expressions 2020-01-10 22:08:02 +01:00
Edwin Cheng
dca9195f75 Add missing expr cases for expand macro 2020-01-11 03:11:23 +08:00
Edwin Cheng
ca62d98781 Expand PAREN_EXPR as expression 2020-01-11 00:29:00 +08:00
bors[bot]
1cbef27ff8
Merge #2625
2625: Clippy lints r=matklad a=kjeremy



Co-authored-by: kjeremy <kjeremy@gmail.com>
2019-12-21 06:12:36 +00:00
kjeremy
0d5d63a80e Clippy lints 2019-12-20 15:14:30 -05:00
Edwin Cheng
ad81d1dbc1 Add support macros in impl blocks 2019-12-21 03:37:03 +08:00
Florian Diebold
5e096def15 Expand macros in blocks to expressions for now
Expanding to statements isn't handled properly yet and breaks things.
2019-12-08 13:03:13 +01:00
Edwin Cheng
509fedd9d2 Remove MacroFileKind 2019-12-08 16:16:52 +08:00
Florian Diebold
4a99ef5c39 Builtin macros only use caller tokens 2019-12-06 21:25:22 +01:00
Florian Diebold
18f6a995d0 Add expansion infrastructure for derive macros 2019-12-05 17:23:09 +01:00
Edwin Cheng
6940ae9eab Rename BuiltinExpander to BuiltinFnLikeExpander 2019-11-23 21:54:39 +08:00
Edwin Cheng
4ff400833f Add MacroFileKind::Statements 2019-11-22 02:38:14 +08:00
Aleksey Kladov
2b6f1ab0e2 Collapse TokenMap and RevTokenMap 2019-11-18 16:08:41 +03:00
Aleksey Kladov
c8f858d043 Make shift an implementation detail of mbe 2019-11-17 19:11:43 +03:00
Edwin Cheng
4f7df2aac1 Add MacroDefKind 2019-11-11 18:48:16 +08:00
Edwin Cheng
c4aa8b63bc Add line macro and tests 2019-11-11 14:15:09 +08:00
Edwin Cheng
c46768d13d Add basic bultin macro infrastructure 2019-11-11 14:13:31 +08: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
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
7e28924012 Use ? and destructing to simplifed long code 2019-11-05 01:38:20 +08:00
Edwin Cheng
e6709f64af Rename and fix typos 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
Aleksey Kladov
99b6ecfab0 switch expand to dyn Trait 2019-10-29 16:12:54 +03:00
Aleksey Kladov
1ec418c3b8 add doc comment 2019-10-29 16:03:29 +03:00
Aleksey Kladov
d095d9273e remove unused query 2019-10-29 15:22:20 +03:00
Aleksey Kladov
858dd48af2 less generics 2019-10-29 15:20:08 +03:00
Aleksey Kladov
6bf7faf315 flatten hir_expand 2019-10-29 15:11:42 +03:00
Aleksey Kladov
5b803055b7 rename hir_def -> hir_expand 2019-10-29 14:59:55 +03:00