Laurențiu Nicola
f8d37ff0b2
Add support for include_bytes
2020-06-27 21:02:47 +03:00
Laurențiu Nicola
b4420626fb
Add support for include_str
2020-06-27 19:34:48 +03:00
Jonas Schievink
4b03b39d5b
draw the rest of the owl
2020-06-24 16:53:16 +02:00
Aleksey Kladov
fac7b0e252
Don't guess macro expansion crate
2020-06-11 12:13:14 +02:00
Aleksey Kladov
d8a5d39c2d
Make relevant_crates return a Set
2020-06-11 11:30:06 +02:00
Aleksey Kladov
bbb40d7463
Minimize FileLoader interface
2020-06-05 17:22:56 +02:00
Aleksey Kladov
bba374bab2
More direct signature for resolve_path
2020-06-05 15:07:30 +02:00
Aleksey Kladov
e63c00f100
Rename resolve_relative_path -> resolve_path
...
For things like `concant!(env!("OUT_DIR"))`, we need to support abs paths
2020-06-05 14:58:30 +02:00
Aaron Loucks
4c655c01f3
Enable hover and autocomplete docs on macro generated items
2020-06-03 06:46:07 -04:00
robojumper
1cd78a3355
correctly infer labelled breaks
2020-05-31 11:40:18 +02:00
kjeremy
bee4f8f9fe
Pass trivially copy types as copy
2020-05-26 14:12:13 -04:00
Edwin Cheng
20f7068b68
Store proc-macro result in salsa db
2020-05-14 17:57:51 +08:00
Trevor Spiteri
3583e0fe2b
fix typo unimplementated -> unimplemented
...
Pretty harmless typo, but it does get exposed in
lsp-rust-analyzer-expand-macro.
2020-05-12 23:51:38 +02:00
bors[bot]
fb8fb65131
Merge #4234
...
4234: Support local_inner_macros r=jonas-schievink a=edwin0cheng
This PR implements `#[macro_export(local_inner_macros)]` support.
Note that the rustc implementation is quite [hacky][1] too. :)
[1]: 614f273e93/src/librustc_resolve/macros.rs (L456)
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-05-02 10:30:49 +00:00
Aleksey Kladov
4f2134cc33
Introduce EffectExpr
2020-05-02 11:21:39 +02:00
Edwin Cheng
443762cda9
Update crates/ra_hir_expand/src/builtin_derive.rs
...
Fix spacing
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
2020-05-02 09:56:38 +08:00
Edwin Cheng
bdcf6f5658
Introduce LowerCtx for path lowering
2020-05-01 20:01:17 +08:00
Edwin Cheng
e4267967a8
Support local_inner_macros
2020-05-01 11:23:03 +08:00
Edwin Cheng
c69f9c1b0a
Check dep name to detect it is core
2020-04-28 04:11:24 +08:00
Edwin Cheng
6d3b0af900
Use empty-deps tricks to detect it is core
2020-04-28 03:32:47 +08:00
Edwin Cheng
213d208e2d
Add test
2020-04-28 02:10:17 +08:00
Edwin Cheng
6a5014329a
Use core instead of std for builtin derive macros
2020-04-28 01:48:55 +08:00
bors[bot]
f654f49435
Merge #4125
...
4125: Avoid lossy OsString conversions r=matklad a=lnicola
This is a bit invasive, and perhaps for not much benefit since non-UTF-8 environment variables don't work anyway.
Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
2020-04-25 10:35:14 +00:00
Aleksey Kladov
b1d5817dd1
Convert code to text-size
2020-04-25 11:59:18 +02:00
Laurențiu Nicola
58dde891f8
Avoid lossy OsString conversions
2020-04-25 12:19:23 +03:00
Edwin Cheng
4a303366c8
Improve remove dervie attrs
2020-04-22 01:44:21 +08:00
Jeremy Kolb
d7f3d858ad
Some clippy fixes
2020-04-19 15:15:49 -04:00
Aleksey Kladov
146f6f5a45
Simplify Diagnostic structure
...
It's not entirely clear what subnode ranges should mean in the
presence of macros, so let's leave them out for now. We are not using
them heavily anyway.
2020-04-17 13:56:42 +02:00
Aleksey Kladov
a8196ffe84
Correctly highlight ranges of diagnostics from macros
...
closes #2799
2020-04-17 13:56:38 +02:00
Aleksey Kladov
302bf97bbf
Don't expose impl details of SyntaxPtr
2020-04-17 12:25:41 +02:00
Aleksey Kladov
5e5eb6a108
Align grammar for record patterns and literals
...
The grammar now looks like this
[name_ref :] pat
2020-04-12 00:00:15 +02:00
Aleksey Kladov
c1244c853c
Forward compat
2020-04-11 00:27:00 +02:00
Edwin Cheng
19d952c603
Improve tt::Subtree debug print
2020-04-10 00:17:32 +08:00
Laurențiu Nicola
52fd2c8e48
Fix unnecessary braces warnings
2020-04-06 17:21:33 +03:00
Edwin Cheng
503cbd3f4b
Implement ra_proc_macro client logic
2020-03-31 22:20:18 +08:00
bors[bot]
b1594f1080
Merge #3727
...
3727: Introduce ra_proc_macro r=matklad a=edwin0cheng
This PR implemented:
1. Reading dylib path of proc-macro crate from cargo check , similar to how `OUTDIR` is obtained.
2. Added a new crate `ra_proc_macro` and implement the foot-work for reading result from external proc-macro expander.
3. Added a struct `ProcMacroClient` , which will be responsible to the client side communication to the External process.
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2020-03-26 17:09:32 +00:00
Edwin Cheng
db162df264
Remove deps on tt_mbe
2020-03-27 00:46:40 +08:00
Aleksey Kladov
db34abeb85
Get rid of ItemOrMacro
2020-03-26 16:10:01 +01:00
Edwin Cheng
d0b6ed4441
Add ProcMacroClient
2020-03-26 03:29:45 +08:00
Edwin Cheng
8afb445357
Rename to CustomDerive
2020-03-25 19:50:12 +08:00
Edwin Cheng
7667aa6033
Refactoring a bit
2020-03-25 19:50:12 +08:00
Edwin Cheng
519dc15cb1
Use dummy implementation
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
062f6e3bbe
Generalise syntax rewriting infrastructure to allow removal of nodes
2020-03-24 17:14:33 +01:00
Edwin Cheng
6d6606895c
Fix typo
2020-03-21 23:08:53 +08:00
Edwin Cheng
e1a9461806
Add identity expansion checking
2020-03-21 22:43:48 +08:00
Aleksey Kladov
f840fcb2f5
Simplify Arena to use a generic index
2020-03-19 18:46:30 +01:00
Florian Diebold
d655749aae
Turn ExpandResult into struct
2020-03-16 18:38:19 +01:00
Florian Diebold
035db0fbb9
Add test, remove printlns
2020-03-16 18:38:19 +01:00
Florian Diebold
0f3a54dd4d
wip
2020-03-16 18:38:19 +01:00