Commit Graph

200 Commits

Author SHA1 Message Date
Edwin Cheng
4ff400833f Add MacroFileKind::Statements 2019-11-22 02:38:14 +08:00
Aleksey Kladov
51baaf298d Rename with_ast -> with_value 2019-11-20 13:09:21 +03:00
Aleksey Kladov
36e3fc9d54 Rename Source::ast -> Source::value 2019-11-20 09:42:30 +03:00
Edwin Cheng
f24bba74d0 Fixed a bug for string lit in quote 2019-11-19 12:15:20 +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
bors[bot]
64dac40a86
Merge #2287
2287: Disable doctests r=matklad a=matklad



Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-17 15:45:30 +00:00
Aleksey Kladov
7e2f4b30db Disable doctests 2019-11-17 18:35:05 +03:00
Aleksey Kladov
6a70bff451 Don't store shift redundantly 2019-11-17 18:22:34 +03:00
Aleksey Kladov
2eaa8c94a8 Goto definition works inside macros 2019-11-16 17:00:54 +03:00
Aleksey Kladov
0404e647e6 Prepare SourceAnalyzer for macros 2019-11-16 00:40:54 +03:00
Aleksey Kladov
bd8af6a413 Sourcify some more 2019-11-16 00:05:10 +03:00
Aleksey Kladov
4c90b7e2ec Sourcify some things
If we want to support macros properly, we need to get rid of those
FileIds everywhere...
2019-11-15 23:24:56 +03:00
memoryruins
a5f57f98ca Heed the advice of rustc's into_iter() warning 2019-11-15 07:18:10 -05:00
Aleksey Kladov
da2ca01eba Handle macro-generated expressions slightly less wrong 2019-11-14 10:30:30 +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
1637a8a590 Add quote macro 2019-11-11 14:14:39 +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
Aleksey Kladov
f6c40c09e0 Minor cleanup 2019-11-09 12:49:35 +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
67226ebc82 Remove dbg! 2019-11-05 01:38:20 +08:00
Edwin Cheng
ae609d7953 Add parent_expansion to HirFileId 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
13735d91a7 Move diagnostics to hir_expand 2019-11-02 23:42:38 +03:00
Aleksey Kladov
b8533413cf Move Source to hir_expand 2019-11-02 23:11:27 +03:00
Aleksey Kladov
ab559f170e move hygiene to hir_expand 2019-10-30 19:10:53 +03:00
Aleksey Kladov
872ac566bf push name down to hir_expand 2019-10-30 18:56:20 +03:00
Aleksey Kladov
b05d6e53fb push either to hir_expand 2019-10-30 18:50:10 +03:00
Aleksey Kladov
16e620c052 move raw_items to hir_def 2019-10-30 17:43:11 +03:00
Aleksey Kladov
bca708ba4c cleanup 2019-10-29 16:19:08 +03:00
Aleksey Kladov
99b6ecfab0 switch expand to dyn Trait 2019-10-29 16:12:54 +03:00
Aleksey Kladov
3260639608 reduce visibility 2019-10-29 16:08:06 +03:00
Aleksey Kladov
1ec418c3b8 add doc comment 2019-10-29 16:03:29 +03:00
Aleksey Kladov
7de6eaa58a remove not that useful indirection 2019-10-29 16:01:14 +03:00
Aleksey Kladov
2a5254c106 reduce visibility 2019-10-29 15:25:46 +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
dba767802d make file id repr private again 2019-10-29 15:01:55 +03:00
Aleksey Kladov
5b803055b7 rename hir_def -> hir_expand 2019-10-29 14:59:55 +03:00