Skip to content
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

Fixed some panics in the lexer #242

Merged
merged 2 commits into from
Feb 4, 2020
Merged

Fixed some panics in the lexer #242

merged 2 commits into from
Feb 4, 2020

Conversation

adumbidiot
Copy link
Contributor

I went through and fixed some of the immediately obvious panics in the lexer, though more work still needs to be done. I removed all unwrap calls and replaced them with expect. I also made parser_expr return a Result<Expr, String> and edited forward and forward_val accordingly.

@adumbidiot
Copy link
Contributor Author

Is there something wrong with the rustfmt config for this repo? My rustfmt didn't appear to work while I was working on this and the CI didn't catch some bad indentations.

@jasonwilliams
Copy link
Member

Are you running the same version of rust as the CI? (rustc 1.41.0) ?
Also you can try cargo clean which usually helps

@adumbidiot
Copy link
Contributor Author

Yeah I'm using 1.41.0. cargo clean doesn't help.

src/lib/lib.rs Outdated Show resolved Hide resolved
src/lib/lib.rs Outdated Show resolved Hide resolved
src/lib/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@jasonwilliams jasonwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some changes to improve the error messages and make them more consistent

 * Applied Requested Fixes
 * Gave `ParseError` a basic `Display` impl
Copy link
Member

@jasonwilliams jasonwilliams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@jasonwilliams jasonwilliams merged commit 18523c5 into boa-dev:master Feb 4, 2020
@adumbidiot adumbidiot deleted the fix-issue-240 branch February 4, 2020 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants