Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use return 0,<exp> to try to deal with comments.
The problem is JavaScript's idiotic automatic semicolon insertion. If you have an expression like ```js return 2 ``` That's just returns undefined. So, if the user enters ``` // hello t ``` That gets converted to ```js return // hello t ``` We used to try to strip linefeeds and comments and it mostly worked but the comment stripper was simple because who the F wants to write a whole effing parser just to strip comments. As a try, if we change the generated code to ```js return 0,// hello t ``` The automatic semicolon insertion doesn't happen and it correctly returns t.
- Loading branch information
3bf5615
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this breaks all postfix examples, except for "glitch machine" and "sansdetta?"
3bf5615
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fixed now.