-
-
Notifications
You must be signed in to change notification settings - Fork 400
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
[Merged by Bors] - Modified the loadfile
example to show how Boa can read bytes
#2363
Conversation
Test262 conformance changesVM implementation
|
Codecov Report
@@ Coverage Diff @@
## main #2363 +/- ##
=======================================
Coverage 39.84% 39.84%
=======================================
Files 242 242
Lines 23242 23242
=======================================
Hits 9260 9260
Misses 13982 13982 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Currently no, since the lexer and the parser assume UTF-8. Though, this will change when we make them generic over chars/u32 instead. |
bors r+ |
Boa's `Context::eval()` and `Context::parse()` functions allow reading a byte slice directly, apart from a string. We were not showing this properly in our examples, so this modifies the `loadfile.rs` example to use a byte vector instead of a string, which allows us to use UTF-16 files, if I'm not mistaken.
Pull request successfully merged into main. Build succeeded: |
loadfile
example to show how Boa can read bytesloadfile
example to show how Boa can read bytes
Boa's
Context::eval()
andContext::parse()
functions allow reading a byte slice directly, apart from a string. We were not showing this properly in our examples, so this modifies theloadfile.rs
example to use a byte vector instead of a string, which allows us to use UTF-16 files, if I'm not mistaken.