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

Incorret lexing of single line comments #963

Closed
RageKnify opened this issue Dec 13, 2020 · 0 comments · Fixed by #964
Closed

Incorret lexing of single line comments #963

RageKnify opened this issue Dec 13, 2020 · 0 comments · Fixed by #964
Labels
bug Something isn't working lexer Issues surrounding the lexer
Milestone

Comments

@RageKnify
Copy link
Contributor

Single line comments in files using CRLF line endings result in the rest of the file being ignored.

To Reproduce
Since a file is required the best way to demonstrate the bug is to run with the following file: cargo run -- test.txt test.txt
The file contains:

console.log('0')
// .
console.log('1')

Expected behavior
boa should output:

0
1
undefined

but instead we do not get the 1

This is probably what caused us to not see an increase in the number of passing test262 tests, a lot of them are not being lexed correctly.

Identified by @tofpie in #961 (comment)

@RageKnify RageKnify added bug Something isn't working lexer Issues surrounding the lexer labels Dec 13, 2020
@Razican Razican added this to the v0.11.0 milestone Dec 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lexer Issues surrounding the lexer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants