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

Readable error messages for syntax errors #124

Closed
stuhlmueller opened this issue Jun 25, 2015 · 1 comment
Closed

Readable error messages for syntax errors #124

stuhlmueller opened this issue Jun 25, 2015 · 1 comment

Comments

@stuhlmueller
Copy link
Member

Currently, it's difficult to tell what is wrong with the syntax. Example:

/Users/stuhlmueller/Projects/webppl/src/transforms/cps.js:167
  switch (node.type) {
              ^
TypeError: Cannot read property 'type' of null
    at cps (/Users/stuhlmueller/Projects/webppl/src/transforms/cps.js:167:15)
    at Array.<anonymous> (/Users/stuhlmueller/Projects/webppl/src/transforms/cps.js:308:14)
    at Array.<anonymous> (/Users/stuhlmueller/Projects/webppl/src/syntax.js:30:27)
    at loop (/Users/stuhlmueller/Projects/webppl/src/syntax.js:50:24)
    at /Users/stuhlmueller/Projects/webppl/src/syntax.js:51:16
    at Array.<anonymous> (/Users/stuhlmueller/Projects/webppl/src/syntax.js:35:16)
    at loop (/Users/stuhlmueller/Projects/webppl/src/syntax.js:50:24)
    at /Users/stuhlmueller/Projects/webppl/src/syntax.js:51:16
    at Array.<anonymous> (/Users/stuhlmueller/Projects/webppl/src/syntax.js:35:16)
    at loop (/Users/stuhlmueller/Projects/webppl/src/syntax.js:50:24)
@stuhlmueller
Copy link
Member Author

This has improved as a side-effect of our use of sweet.js. I'm going to close this for now—if anyone gets obscure syntax errors, feel free to reopen.

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

No branches or pull requests

1 participant