-
Notifications
You must be signed in to change notification settings - Fork 2
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
update tests and fix bugs in parser #64
base: master
Are you sure you want to change the base?
Conversation
Fix some parser bugs (vuvoth#62)
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.
quick review!
use crate::token_kind::TokenKind; | ||
|
||
#[derive(Debug, PartialEq)] | ||
#[derive(Debug, PartialEq, Serialize)] |
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.
Why do you add the Serialize trait?
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.
we need that trait for the snapshot testing (insta)
fn test(source: &str, snapshot_name: &str) {
let input = Input::new(&source);
insta::assert_yaml_snapshot!(snapshot_name, input);
}
Update tests
Fix
expect
witheat
in the block parserexpect
andexpect_any
Add some other token kinds