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
Aleksey Kladov
8843588fca
Convert tests to text-size
2020-04-25 11:59:18 +02:00
Aleksey Kladov
5e2f29af85
Add failing test
2020-04-10 19:43:37 +02:00
Aleksey Kladov
da8eb29a2f
Macro patterns are not confused with expressions.
...
We treat macro calls as expressions (there's appropriate Into impl),
which causes problem if there's expresison and non-expression macro in
the same node (like in the match arm).
We fix this problem by nesting macor patterns into another node (the
same way we nest path into PathExpr or PathPat). Ideally, we probably
should add a similar nesting for macro expressions, but that needs
some careful thinking about macros in blocks: `{ am_i_expression!() }`.
2020-04-03 16:12:38 +02:00
Edwin Cheng
2adc9a8d5f
Remove collect proc_macro definitions
2020-03-25 20:14:22 +08:00
Edwin Cheng
5bd3aa05d6
Fix trailling whitespace
2020-03-25 19:50:12 +08:00
Edwin Cheng
34dc8d25c1
Add basic custom derive lowering
2020-03-25 19:50:12 +08:00
Florian Diebold
b973158aeb
Make MBE expansion more resilient (WIP)
2020-03-16 18:38:19 +01:00
Edwin Cheng
fe78a14bbb
Support local macro_rules
2020-03-14 14:25:51 +08:00
Edwin Cheng
5a292309c5
Add and fix tests
2020-03-11 01:06:01 +08:00
Edwin Cheng
18f88ad10b
Prevent include! macro include itself
2020-03-07 19:08:42 +08:00
Edwin Cheng
36c7684687
Use a not so dummy implementation of env macro
2020-03-07 12:53:40 +08:00
Edwin Cheng
0a06c7e6e6
Implment include macro
2020-03-06 22:58:45 +08:00
Edwin Cheng
e04c0f4222
Fix panic on eager expansion
2020-03-04 02:41:33 +08:00
Edwin Cheng
fe04c28b59
Add test
2020-03-04 01:21:14 +08:00
Aleksey Kladov
a1e1869554
Rename ast::ImplBlock -> ast::ImplDef
2020-02-29 21:33:15 +01:00
Edwin Cheng
6ebb1edf21
Use dummy value for line! and column! macro
2020-01-15 01:47:01 +08:00
Florian Diebold
dd6ec81d65
Add test for macro expansion in various expressions
2020-01-10 22:08:02 +01:00
Edwin Cheng
360de5ba71
Recursive collect macros in impl items
2019-12-21 05:02:31 +08:00
Edwin Cheng
ad81d1dbc1
Add support macros in impl blocks
2019-12-21 03:37:03 +08:00
Edwin Cheng
76ff5b7c15
Add tests
2019-12-06 23:48:45 +08:00
Florian Diebold
db8a00bd99
Implement derive(Copy, Clone) properly (well, kind of)
2019-12-05 19:29:57 +01:00
Florian Diebold
9747156f6c
Split up ty tests a bit
2019-12-03 18:00:29 +01:00