aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand/src
Commit message (Collapse)AuthorAgeFilesLines
* Remove ImportResolver-related stubsKirill Bulatov2020-02-091-7/+0
|
* Code review fixesKirill Bulatov2020-02-021-6/+7
|
* Require ModPath for importingKirill Bulatov2020-02-021-0/+6
|
* Prefer imports starting with stdKirill Bulatov2020-01-271-0/+2
|
* Use dummy value for line! and column! macroEdwin Cheng2020-01-141-83/+13
|
* Use attr location for builtin macro goto-impEdwin Cheng2020-01-121-0/+15
|
* Apply review suggestionsFlorian Diebold2020-01-111-4/+0
|
* Some more refactoringFlorian Diebold2020-01-111-0/+10
|
* basics workingFlorian Diebold2020-01-111-0/+4
|
* Merge #2795bors[bot]2020-01-111-2/+10
|\ | | | | | | | | | | | | | | | | | | | | | | 2795: Use dummy value for macro file in bulitin macros r=matklad a=edwin0cheng This PR skip the actual line and column computation for `MacroFile` and return a dummy value instead. Related to #2794 Co-authored-by: Edwin Cheng <[email protected]>
| * Use dummy value for macro file in bulitin macrosEdwin Cheng2020-01-111-2/+10
| |
* | Add test for macro expansion in various expressionsFlorian Diebold2020-01-101-1/+0
|/
* Add missing expr cases for expand macroEdwin Cheng2020-01-101-1/+23
|
* Expand PAREN_EXPR as expressionEdwin Cheng2020-01-101-0/+1
|
* Fix panic in tuple fieldsAleksey Kladov2020-01-071-1/+4
|
* Add dummy implementations of env! and option_env! builtinsFlorian Diebold2019-12-213-43/+99
| | | | | | They don't do anything except return the correct type. Also refactor the builtin macro tests a bit.
* Merge #2625bors[bot]2019-12-212-6/+5
|\ | | | | | | | | | | | | | | 2625: Clippy lints r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
| * Clippy lintskjeremy2019-12-202-6/+5
| |
* | Add support macros in impl blocksEdwin Cheng2019-12-201-0/+1
|/
* Merge #2614bors[bot]2019-12-201-1/+1
|\ | | | | | | | | | | | | | | 2614: Clippy cleanup r=matklad a=kjeremy Just a few tweaks from the latest clippy. There are a lot more but we should probably tweak our settings. Co-authored-by: kjeremy <[email protected]>
| * Remove useless clonekjeremy2019-12-201-1/+1
| |
* | Add std::ops::Index support for inferingEdwin Cheng2019-12-191-0/+1
|/
* Rename range to by_kindEdwin Cheng2019-12-181-2/+2
|
* Add TokenTextRangeEdwin Cheng2019-12-181-2/+2
|
* Add token id to delimsEdwin Cheng2019-12-181-3/+11
|
* Add token ids for all tt::LeafEdwin Cheng2019-12-182-9/+32
|
* Merge #2562bors[bot]2019-12-171-2/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2562: Fix NavigationTarget ranges r=matklad a=edwin0cheng Fix the issue described in https://github.com/rust-analyzer/rust-analyzer/pull/2544#issuecomment-565572553 This PR change the order for finding `full_range` of `focus_range` in following orders: 1. map both ranges to macro_call 2. map focus range to a token inside macro call, and full range to the whole of macro call 3. map both ranges to the whole of macro call And fix the corresponding tests and make these tests easily to follow. Co-authored-by: Edwin Cheng <[email protected]>
| * Re-export Origin to replace ExpansionOriginEdwin Cheng2019-12-141-13/+7
| |
| * Fix original_source find orderEdwin Cheng2019-12-141-7/+22
| |
* | Rename N! to name!Florian Diebold2019-12-133-4/+4
| |
* | Add macros for known names and pathsFlorian Diebold2019-12-133-91/+117
|/
* Merge #2550bors[bot]2019-12-131-0/+2
|\ | | | | | | | | | | | | | | 2550: Infer - and ! using std::ops::{Neg, Not} r=flodiebold a=kiljacken Found some low hanging fruit while taking a cursory look at index inferring. Co-authored-by: Emil Lauridsen <[email protected]>
| * Correctly infer - and ! using std::ops::{Neg,Not}Emil Lauridsen2019-12-131-0/+2
| |
* | Refactor tt::DelimiterEdwin Cheng2019-12-131-3/+4
|/
* Move traits to the new locAleksey Kladov2019-12-121-1/+4
|
* Expand macros in blocks to expressions for nowFlorian Diebold2019-12-081-2/+2
| | | | Expanding to statements isn't handled properly yet and breaks things.
* Fix expansion of format_argsFlorian Diebold2019-12-081-6/+13
|
* Remove MacroFileKindEdwin Cheng2019-12-084-25/+46
|
* Implement ancestors_with_macros in a better wayFlorian Diebold2019-12-061-0/+21
|
* Builtin macros only use caller tokensFlorian Diebold2019-12-061-2/+2
|
* Try to make go to definition work in format!Florian Diebold2019-12-061-0/+18
| | | | | | | 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.
* Implement format_args more properlyFlorian Diebold2019-12-061-4/+43
|
* Remove unnecessary len parameter for Name::new_inline_asciiFlorian Diebold2019-12-061-59/+59
| | | | | I assume it was previously required because `len` was not const, but that doesn't seem to be a problem anymore.
* Add stub implementation of format_args{_nl} macrosFlorian Diebold2019-12-062-1/+20
| | | | Just enough to fix the huge amount of type mismatches they cause.
* Implement all the other built-in derivesFlorian Diebold2019-12-052-15/+86
| | | | Since as long as we're not implementing the bodies, they all work the same way.
* Implement derive(Copy, Clone) properly (well, kind of)Florian Diebold2019-12-052-7/+190
|
* Add expansion infrastructure for derive macrosFlorian Diebold2019-12-057-51/+170
|
* Replace `ra_hir_expand::either` with crateice10002019-12-033-58/+3
|
* Infer range typesoxalica2019-11-281-0/+6
|
* Use InFile for AstIdAleksey Kladov2019-11-281-35/+4
|