aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Implement dummy expansions for builtin attributesLukas Wirth2021-06-091-0/+4
|
* Expand procedural attribute macrosJonas Schievink2021-06-031-3/+21
|
* Thread proc-macro types through the HIRJonas Schievink2021-05-291-2/+3
|
* internal: move diagnostics to hirAleksey Kladov2021-05-251-4/+3
| | | | | | | | | | | | | | | | | | | | | | | The idea here is to eventually get rid of `dyn Diagnostic` and `DiagnosticSink` infrastructure altogether, and just have a `enum hir::Diagnostic` instead. The problem with `dyn Diagnostic` is that it is defined in the lowest level of the stack (hir_expand), but is used by the highest level (ide). As a first step, we free hir_expand and hir_def from `dyn Diagnostic` and kick the can up to `hir_ty`, as an intermediate state. The plan is then to move DiagnosticSink similarly to the hir crate, and, as final third step, remove its usage from the ide. One currently unsolved problem is testing. You can notice that the test which checks precise diagnostic ranges, unresolved_import_in_use_tree, was moved to the ide layer. Logically, only IDE should have the infra to render a specific range. At the same time, the range is determined with the data produced in hir_def and hir crates, so this layering is rather unfortunate. Working on hir_def shouldn't require compiling `ide` for testing.
* Make `TokenTextRange` privateJonas Schievink2021-05-241-2/+2
|
* Track in-scope derive helpers during nameresJonas Schievink2021-05-191-1/+1
|
* Clarify field nameJonas Schievink2021-05-191-1/+1
|
* Simplify eager macro representationJonas Schievink2021-05-191-93/+31
|
* Strip delimiter from fn-like proc macro inputJonas Schievink2021-05-111-0/+4
|
* Rewrite `#[derive]` removal to be based on ASTJonas Schievink2021-05-101-2/+14
|
* Move `AttrId` back into `hir_def`Jonas Schievink2021-05-101-4/+1
|
* Precompute macro fragment kindJonas Schievink2021-05-091-2/+66
|
* make illegal states unrepresentableAleksey Kladov2021-05-041-11/+10
| | | | only declarative macros have def-site token map
* Revert "Rewrite `#[derive]` removal to be based on AST"Jonas Schievink2021-04-101-1/+0
| | | | This reverts commit 7e78aebc8fbbb4043d62949681e4d700f1a2ec46.
* Rewrite `#[derive]` removal to be based on ASTJonas Schievink2021-04-091-0/+1
|
* Store `#[derive]` attribute ID along macro invocJonas Schievink2021-04-091-1/+1
|
* Add `AttrId` to track attribute sourcesJonas Schievink2021-04-091-0/+3
|
* Use named fields in `MacroCallKind`Jonas Schievink2021-04-081-8/+10
|
* Basic Support Macro 2.0Edwin Cheng2021-03-271-1/+1
|
* use the included file as the source of expanded include macroYilin Chen2021-03-211-1/+22
| | | | Signed-off-by: Yilin Chen <[email protected]>
* Return `Either` from `MacroDefId::ast_id`Jonas Schievink2021-03-191-4/+5
|
* Rename derive-specific APIsJonas Schievink2021-03-191-4/+4
|
* Store an `AstId` for procedural macrosJonas Schievink2021-03-181-2/+2
|
* Make MacroDefId's `AstId` mandatory when possibleJonas Schievink2021-03-181-7/+17
|
* remove uselessly wrapped ?s. (clippy::meedless_question_markMatthias Krüger2021-03-171-2/+2
| | | | | | | | let x = Some(3); let y = Some(x?); can just be: let y = x
* Upgrade rowanAleksey Kladov2021-03-161-1/+4
| | | | Notably, new rowan comes with support for mutable syntax trees.
* Remove useless wrapperAleksey Kladov2021-01-151-4/+4
|
* Revert "Proper handling $crate and local_inner_macros"Jonas Schievink2021-01-031-4/+7
|
* Introduce HygieneFrames for proper token hygineeEdwin Cheng2021-01-021-7/+4
|
* Store invocation site for eager macrosJonas Schievink2020-12-221-14/+13
|
* Make macro def krate mandatoryJonas Schievink2020-12-151-7/+1
| | | | Refactors builtin derive support to go through proper name resolution
* Basic support for decl macros 2.0Jonas Schievink2020-12-151-2/+5
|
* Move to upstream `macro_rules!` modelJonas Schievink2020-12-151-1/+1
|
* Fix logic for determining macro callsJonas Schievink2020-12-081-9/+7
| | | | | | I believe this currently goes back all the way to the initial user-written call, but that seems better than the current broken behavior.
* Make `original_range` a method on `InFile<&SyntaxNode>`Jonas Schievink2020-12-081-3/+69
|
* Fix proc macro token mappingJonas Schievink2020-12-031-6/+16
|
* Publish diagnostics for macro expansion errorsJonas Schievink2020-11-271-1/+1
|
* Use `ExpandResult` instead of `MacroResult`Jonas Schievink2020-11-261-0/+2
| | | | `MacroResult` is redundant
* Rename `parse_macro` to `parse_macro_expansion`Jonas Schievink2020-11-241-1/+1
| | | | This does not parse macros, it expands a macro and parses the *result*
* hir_expand: propagate expansion errorsJonas Schievink2020-11-241-1/+1
|
* Rename `CustomDerive` to `ProcMacro`Jonas Schievink2020-09-181-1/+1
| | | | | It handles fn-like macros too, and will handle attribute macros in the future
* Rename ra_hir_expand -> hir_expandAleksey Kladov2020-08-131-0/+453