diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-11 10:53:24 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-11-11 10:53:24 +0000 |
commit | ef2a9aedb6ac7f0b79e636cff7947935fecb909d (patch) | |
tree | a603361f9e6c02d90c0ae8cdfd0902370677f71d /crates/ra_hir_expand/src/name.rs | |
parent | 5ac4ffbc121c8231fe3ea5c2bb918f7aae60f197 (diff) | |
parent | 4f7df2aac107c0de2cab851f2a4f1ab369511fc8 (diff) |
Merge #2205
2205: Implement bulitin line! macro r=matklad a=edwin0cheng
This PR implements bulitin macro `line!` and add basic infra-structure for other bulitin macros:
1. Extend `MacroDefId` to support builtin macros
2. Add a `quote!` macro for simple quasi quoting.
Note that for support others builtin macros, eager macro expansion have to be supported first, this PR not try to handle it. :)
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_hir_expand/src/name.rs')
-rw-r--r-- | crates/ra_hir_expand/src/name.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/ra_hir_expand/src/name.rs b/crates/ra_hir_expand/src/name.rs index 720896ee8..1bf17d12b 100644 --- a/crates/ra_hir_expand/src/name.rs +++ b/crates/ra_hir_expand/src/name.rs | |||
@@ -140,3 +140,6 @@ pub const RESULT_TYPE: Name = Name::new_inline_ascii(6, b"Result"); | |||
140 | pub const OUTPUT_TYPE: Name = Name::new_inline_ascii(6, b"Output"); | 140 | pub const OUTPUT_TYPE: Name = Name::new_inline_ascii(6, b"Output"); |
141 | pub const TARGET_TYPE: Name = Name::new_inline_ascii(6, b"Target"); | 141 | pub const TARGET_TYPE: Name = Name::new_inline_ascii(6, b"Target"); |
142 | pub const BOX_TYPE: Name = Name::new_inline_ascii(3, b"Box"); | 142 | pub const BOX_TYPE: Name = Name::new_inline_ascii(3, b"Box"); |
143 | |||
144 | // Builtin Macros | ||
145 | pub const LINE_MACRO: Name = Name::new_inline_ascii(4, b"line"); | ||