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

Strict Mode Lex/Parse #716

Closed
5 tasks done
Lan2u opened this issue Sep 26, 2020 · 0 comments · Fixed by #717
Closed
5 tasks done

Strict Mode Lex/Parse #716

Lan2u opened this issue Sep 26, 2020 · 0 comments · Fixed by #717
Assignees
Labels
enhancement New feature or request lexer Issues surrounding the lexer parser Issues surrounding the parser
Milestone

Comments

@Lan2u
Copy link

Lan2u commented Sep 26, 2020

ECMASCript feature
As per https://tc39.es/ecma262/#sec-strict-mode-code and https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode ECMAScript can be processed using either strict or unstrict mode. When parsing/lexing we currently only account for the strict case in a few select areas such as number lexing however in-order for boa to support strict mode fully we need to expand this to other areas.

Example code
For example, the following code is processed by boa fine when it should produce a SyntaxError as 'implements' is a reserved keyword in strict mode code.

    'use strict';
    var implements;

Initially, I'm planning to focus on the lexing/parsing side and then the interpreting side can come after.

  • Strict mode number lexing/parsing
  • Strict mode dis-allowed keywords
  • Strict mode identifier lexing/parsing
  • Strict mode directive-prologue parsing
  • Strict mode function argument parsing

Will add more as I come across them

@Lan2u Lan2u added enhancement New feature or request parser Issues surrounding the parser lexer Issues surrounding the lexer execution Issues or PRs related to code execution labels Sep 26, 2020
@Lan2u Lan2u added this to the v0.11.0 milestone Sep 26, 2020
@Lan2u Lan2u self-assigned this Sep 26, 2020
@Lan2u Lan2u changed the title Strict Mode Strict Mode Lex/Parse Oct 4, 2020
@Lan2u Lan2u removed the execution Issues or PRs related to code execution label Oct 4, 2020
@Lan2u Lan2u linked a pull request Oct 4, 2020 that will close this issue
@Lan2u Lan2u closed this as completed in #717 Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request lexer Issues surrounding the lexer parser Issues surrounding the parser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant