Edwin Cheng
ab91050d49
Fix typo
2019-05-03 00:01:48 +08:00
Edwin Cheng
91745c62f8
Compare text instead
2019-05-02 23:59:13 +08:00
Edwin Cheng
1446d620c5
Add empty bindings and some refactoring
2019-05-02 23:23:14 +08:00
Edwin Cheng
35c4633150
Make vis
matcher optional and fix typo
2019-05-02 21:24:51 +08:00
Edwin Cheng
779676f782
Remove unused code in subtree_source
2019-05-02 10:19:12 +08:00
Edwin Cheng
a7ef9bac4e
Formating
2019-05-02 10:08:11 +08:00
Edwin Cheng
6b2985ebc7
Remove unused code and add space bewteen tt
2019-05-02 10:02:17 +08:00
Edwin Cheng
d436ab0581
Refactor parser handle mult-char punct internally
2019-04-28 23:46:03 +08:00
Edwin Cheng
1908819bf6
Use panic instead of unwrap
2019-04-26 02:56:44 +08:00
Edwin Cheng
c55a2dbc1d
Fix more bugs
2019-04-26 02:03:56 +08:00
Edwin Cheng
299d97b6d9
Add handling token
seperator in mbe
2019-04-26 02:03:55 +08:00
Edwin Cheng
e4e2338f97
Fix incorrect repeat sep eating
2019-04-26 02:03:55 +08:00
Edwin Cheng
fccd045229
Add cached for SubtreeSource
2019-04-22 22:46:39 +08:00
Edwin Cheng
bb84fce1a4
Remove unused print out
2019-04-22 20:21:14 +08:00
Edwin Cheng
1cdfc38066
Add a test for #1178 case
2019-04-22 20:14:46 +08:00
Edwin Cheng
b177813f3b
Add mbe expand limit and poision macro set
2019-04-22 15:33:55 +08:00
Edwin Cheng
120bfde3c2
Add tests
2019-04-22 05:04:37 +08:00
Edwin Cheng
3d1cdc834d
Fix offset bug in SourceWalker
2019-04-22 05:04:37 +08:00
Edwin Cheng
49c9686c3c
Handle *+
case and single token case
2019-04-22 05:04:37 +08:00
Edwin Cheng
bcf5cf8ac6
fix mbe_parser rhs colon parsing
2019-04-22 05:04:37 +08:00
Edwin Cheng
da05bbcfb1
Fix lifetime in tt to syntax node conversion
2019-04-22 05:04:36 +08:00
Edwin Cheng
9e35bf91b8
Fix bugs
2019-04-20 23:53:39 +08:00
Edwin Cheng
210c762fe6
Disable test_tt_xx
2019-04-20 02:41:13 +08:00
Edwin Cheng
41c1a639c3
Disable tt matcher
2019-04-20 02:19:46 +08:00
Edwin Cheng
1afde29adb
Add back missing assert
2019-04-19 21:52:54 +08:00
Edwin Cheng
763569017a
Fix bug for ident to lifetime
2019-04-19 21:43:41 +08:00
Edwin Cheng
87ff908135
Add vis matcher
2019-04-19 21:38:26 +08:00
Edwin Cheng
c5983b85fc
Add literal matcher
2019-04-19 21:21:47 +08:00
Edwin Cheng
313854c728
Add lifetime matcher
2019-04-19 21:15:19 +08:00
Edwin Cheng
59b6cc780b
add tt matcher
2019-04-19 19:41:59 +08:00
Edwin Cheng
762819864f
add block matcher
2019-04-19 19:33:29 +08:00
Edwin Cheng
8092b6487f
Add block matcher
2019-04-19 18:30:43 +08:00
bors[bot]
ab0a96586f
Merge #1148
...
1148: Add token_tree_to_xxx functions r=matklad a=edwin0cheng
<del>As discus in PR #1147 , this PR added a `mbe::MacroKind` .
Currently only 2 kind of macro are supported, `SourceFile` and `Block`.</del>
Added following functions for `tt::TokenTree` and `ast::Node` conversion:
* token_tree_to_expr
* token_tree_to_pat
* token_tree_to_ty
* token_tree_to_macro_stmts
* token_tree_to_macro_items
And added two new syntax kind:
* MACRO_ITEMS
* MACRO_STMTS
Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-04-19 08:56:39 +00:00
Edwin Cheng
a6d51e0961
Return Result for token_tree_to_xx functions
2019-04-19 04:03:22 +08:00
Edwin Cheng
c0f19d7005
Add expr, pat, ty and macro_stmts
2019-04-19 03:49:56 +08:00
Edwin Cheng
3ff5440a50
Add MacroItems and MacroStmts in grammer.ron
2019-04-19 02:47:29 +08:00
Edwin Cheng
e8ddeb869d
Fix missing last token in mbe $repeat parsing
2019-04-18 23:33:54 +08:00
Edwin Cheng
e944fd059d
Add item
matcher in mbe
2019-04-18 10:21:36 +08:00
Edwin Cheng
57e4122b89
Add mbe stmt matcher
2019-04-17 12:34:43 +08:00
Edwin Cheng
6646d49f23
Fix bug and add expr , pat , ty matcher
2019-04-14 11:42:20 +08:00
Edwin Cheng
f66300ccd1
Remove skip Delimiter::None and handle Dollars
2019-04-13 01:50:05 +08:00
Edwin Cheng
8ed7104578
Refactoring and add some docs
2019-04-08 20:32:21 +08:00
Edwin Cheng
c785c7312d
Fixed infintite loop bug
2019-04-08 19:21:07 +08:00
Edwin Cheng
184e9ea230
Fixed empty node bug
2019-04-08 18:21:48 +08:00
Edwin Cheng
2697ecaa64
Use SubtreeWalker instread of flatten TtToken
2019-04-08 15:58:02 +08:00
Edwin Cheng
a7254201df
Combine all tokensource to one and refactoring
2019-04-08 00:12:07 +08:00
Edwin Cheng
7f1e93a3c9
Refactoring subtree_source
2019-04-07 21:42:53 +08:00
Edwin Cheng
aac9dfa464
Add TtCursorTokenSource and TtCursorTokenSink
2019-04-06 20:14:28 +08:00
Edwin Cheng
1d7735fbc6
Add path test and empty eat_path handling
2019-04-06 12:12:32 +08:00
Edwin Cheng
7abc06bd57
Add proper test for literals and fixed typo bug
2019-04-05 20:58:24 +08:00