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
Aleksey Kladov
131c2da6bf
⬆️ salsa
2019-11-26 11:29:20 +03:00
bors[bot]
e00e6554dd
Merge #2362
...
2362: Expand compile_error! r=edwin0cheng a=kjeremy
Does not validate that the input is a string literal. I thought that I could `match_ast!` against the `macro_args` but that did not work. Even if it had I am not sure which error would be appropriate.
Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2019-11-25 04:51:42 +00:00
Jeremy Kolb
67d3600f59
Expand compile_error!
2019-11-24 19:01:51 -05:00
Marco Groppo
ceb13a0494
Fix panic during the expansion of column!
2019-11-24 23:49:58 +01:00
Edwin Cheng
16854e28ef
Use macro for all the things
2019-11-23 22:48:34 +08:00
Edwin Cheng
6940ae9eab
Rename BuiltinExpander to BuiltinFnLikeExpander
2019-11-23 21:54:39 +08:00
Edwin Cheng
720ab0bef8
Refactor builtin macro
2019-11-23 01:47:35 +08:00
Edwin Cheng
f4e78a5f4e
Add TestDB
2019-11-23 01:11:33 +08:00
Jeremy Kolb
1ee5592be2
Expand column!()
2019-11-22 11:34:48 -05:00
kjeremy
786544f022
Expand file! to dummy ""
2019-11-22 10:05:04 -05:00
Piotr Szpetkowski
8ae5d6faf6
Add support for Stringify builtin macro
2019-11-22 07:56:50 +01: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
Edwin Cheng
f24bba74d0
Fixed a bug for string lit in quote
2019-11-19 12:15:20 +08: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
bors[bot]
64dac40a86
Merge #2287
...
2287: Disable doctests r=matklad a=matklad
Co-authored-by: Aleksey Kladov <aleksey.kladov@gmail.com>
2019-11-17 15:45:30 +00:00
Aleksey Kladov
7e2f4b30db
Disable doctests
2019-11-17 18:35:05 +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
memoryruins
a5f57f98ca
Heed the advice of rustc's into_iter() warning
2019-11-15 07:18:10 -05: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
c4aa8b63bc
Add line macro and tests
2019-11-11 14:15:09 +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
70f2a21b55
Remove typed macro parsing API
...
We do type-erasure on every path anyway, so it doesn't make much sense
to duplicate this function for every type
2019-11-09 13:14:10 +03: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
62ed93db13
Refactor and add more comments
2019-11-08 10:19:41 +08:00
Edwin Cheng
2a76bb5a0b
Refactor a bit
2019-11-05 03:20:54 +08:00
Edwin Cheng
604bdc6ffe
Use macro_rules shift to map text ranges
2019-11-05 02:09:16 +08:00
Edwin Cheng
7e28924012
Use ? and destructing to simplifed long code
2019-11-05 01:38:20 +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
Aleksey Kladov
ab559f170e
move hygiene to hir_expand
2019-10-30 19:10:53 +03:00
Aleksey Kladov
872ac566bf
push name down to hir_expand
2019-10-30 18:56:20 +03:00