-
Notifications
You must be signed in to change notification settings - Fork 47
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
Terminating ; missing from next to last function definition #81
Comments
Thanks for filing this issue, that was a genuine bug. It's worth noting that you're "reverse shadowing" a macro called "unless." If you want to use the function version instead of the macro version, you'll need to I've added #83 to add a warning for situations like this. As far as the semicolon issue, I just tested this with the significantly improved and rewritten internals. As of 0.3.1, this is the result: var unless = (function unless$(condition, body) {
/* unless eval.sibilant:1:0 */
return (function() {
if (condition) {
return nil;
} else {
return body;
}
})();
});
(function() {
if ((!true)) {
return console.log("false");
}
})();
(function() {
if ((!(12 === (2 * 6)))) {
return console.log("2*6 != 12!");
}
})(); I hope that's what you'd expect. Thanks! |
I don't think |
I think it's better for you to decide whether or not to close this, given leaving it opened leaves a reminder of a needed action (documenting unless?). Hence, reopened. |
@gamecubate You're quite right. The documentation is not thorough and that hampers learning. Thank you for pointing this out. It's a larger issue than I'm going to close this issue, which was primarily about the semicolon insertion, and have opened #84. Please add any further ideas for docs over there Thanks again |
A bug?
Compiling this:
gives that:
IOW the next to last function is not terminated with a semi-column, thus triggering an error when the code is executed in the browser;
The text was updated successfully, but these errors were encountered: