-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugs fixes And Improvements of MBE #1209
Conversation
break; | ||
} | ||
_ => break, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a test for it?
Also, this was recently changed in rust-lang/rust#57367, I am not sure if the refercne is up-to-date
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know where to add the test, as this function only called from mbe right now.
I can add that test in mbe if you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, right, the parser doesn't need this itself. I guess I am fine with existing tests in mbe then!
bors r+ |
1209: Bugs fixes And Improvements of MBE r=matklad a=edwin0cheng This PR fixed / improve followings things: * Add `token` `$repeat` separator support: Previously $repeat only support single punct separator. * Fixed a bug which expand infinite pattern, see `test_match_group_in_group` * Correctly handle +,*,? case of $repeat patterns * Increase the limit of $repeat patterns (128 => 65536), personally i think we could remove this limit as we seem to fix all major loop bugs * **Re-enable tt matcher** * Better meta item parsing. * Add related tests and add some real world test cases. * Add more debug information. Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
Finally i feel confident to refactor the lexer and mbe with enough test cases :) |
@edwin0cheng yeah, I also feel that that's just the right approach: build the basic test-suite using simplistic solution, then refactor to the proper infra, and then the remaining 90% of fixing all of the bugs :D |
Build succeeded |
This PR fixed / improve followings things:
token
$repeat
separator support: Previously $repeat only support single punct separator.test_match_group_in_group