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

Add support of syntax error checking #54

Closed
14 tasks done
sand1k opened this issue May 13, 2015 · 3 comments
Closed
14 tasks done

Add support of syntax error checking #54

sand1k opened this issue May 13, 2015 · 3 comments
Assignees
Labels
development Feature implementation normal parser Related to the JavaScript parser

Comments

@sand1k
Copy link
Contributor

sand1k commented May 13, 2015

  • implement setjmp / longjmp
  • add checks into parsing of expression
    • 11.1.5
    • 11.3.1
    • 11.3.2
    • 11.4.1
    • 11.4.4
    • 11.4.5
    • 11.13.1
    • 11.13.2
    • 12.2.1
    • 12.10.1
    • 12.14.1
    • 13.1
@galpeter
Copy link
Contributor

One test case to consider which was raised during the review of the eval implementation (#174) is the following:

var r = function() { return eval('return 1;'); };
try {
    r();
    print("fail");
    assert(false);
} catch (e) {
    print(e);
    assert(e instanceof SyntaxError);
}

It prints out the fail message, but a SyntaxError should be thrown. Other engines reports the error with the "return not in function" message.

@ruben-ayrapetyan
Copy link
Contributor

@galpeter, thank you for the case.

@egavrin
Copy link
Contributor

egavrin commented Jun 30, 2015

@sand1k please recheck this issue after unicode implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
development Feature implementation normal parser Related to the JavaScript parser
Projects
None yet
Development

No branches or pull requests

4 participants