Aleksey Kladov
b1d5817dd1
Convert code to text-size
2020-04-25 11:59:18 +02:00
Edwin Cheng
8afb445357
Rename to CustomDerive
2020-03-25 19:50:12 +08:00
Edwin Cheng
34dc8d25c1
Add basic custom derive lowering
2020-03-25 19:50:12 +08:00
Aleksey Kladov
9faea2364d
Use dyn Trait
for working with databse
...
It improves compile time in `--release` mode quite a bit, it doesn't
really slow things down and, conceptually, it seems closer to what we
want the physical architecture to look like (we don't want to
monomorphise EVERYTHING in a single leaf crate).
2020-03-16 17:42:30 +01:00
Veetaha
7eb5d89a85
ra_hir_expand: change the ordering of imports as per the formatter
2020-03-15 18:51:09 +02:00
Veetaha
cbd9f46bc7
ra_hir_expand: migrate to impl_intern_key!()
2020-03-15 18:25:55 +02:00
Edwin Cheng
1465cc0c4f
Implement concat macro
2020-03-04 01:21:14 +08:00
Edwin Cheng
0d55454073
Add LazyMacroId
2020-03-04 01:21:14 +08:00
Aleksey Kladov
f2424f947c
Add couple of utility methods
2020-02-12 18:19:55 +01:00
Edwin Cheng
d7be1a4372
Use attr location for builtin macro goto-imp
2020-01-12 18:08:53 +08:00
Florian Diebold
12905e5b58
Some more refactoring
2020-01-11 23:33:04 +01:00
Edwin Cheng
2ea1cfd780
Rename range to by_kind
2019-12-18 11:36:10 +08:00
Edwin Cheng
320416d756
Add TokenTextRange
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
61360fdfec
Fix original_source find order
2019-12-15 01:24:51 +08:00
Edwin Cheng
509fedd9d2
Remove MacroFileKind
2019-12-08 16:16:52 +08:00
Florian Diebold
b2c01f446e
Implement ancestors_with_macros in a better way
2019-12-06 21:53:31 +01:00
Florian Diebold
a565072dde
Try to make go to definition work in format!
...
SourceAnalyzer didn't work properly within expression macro expansions because
it didn't find the enclosing function. Fix this by going up the expansion chain
to find ancestors. This makes the test work, but apparently in real usage it's
still not working.
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
ice1000
009437f5d9
Replace ra_hir_expand::either
with crate
2019-12-03 11:07:56 -05:00
Aleksey Kladov
e823c578c9
Use InFile for AstId
2019-11-28 16:02:38 +03:00
Aleksey Kladov
ccd1b0800a
Rename Source -> InFile
2019-11-28 12:50:26 +03:00
Edwin Cheng
447268ceac
Hide MacroCallLoc
2019-11-27 01:33:08 +08:00
Edwin Cheng
6940ae9eab
Rename BuiltinExpander to BuiltinFnLikeExpander
2019-11-23 21:54:39 +08:00
Edwin Cheng
f4e78a5f4e
Add TestDB
2019-11-23 01:11:33 +08:00
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
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
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
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
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
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
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