It is often necessary to comment out large chunks of code. For this reason the /* */ comment exists for removing multiple lines. However, it can be very annoying to place the /* at the top of a section and a */ at the bottom, often including an incorrect number of parentheses or braces. Jasmine has a feature to ignore tests by simply putting an x in front.
describe("Some tests", function () {
... // Run
})
xdescribe("Some other tests", function () {
... // Not run
});
A similar feature could be implemented in Uniform to create such behavior. I suggest a /- token to declare such behavior. It would look something along the lines of:
/-$("#commented") {
... // Not used
}
$("#uncommented") {
... // Used
}
Which would be functionally equivalent to:
/*$("#commented") {
... // Not used
}*/
$("#uncommented") {
... // Used
}
It is often necessary to comment out large chunks of code. For this reason the
/* */
comment exists for removing multiple lines. However, it can be very annoying to place the/*
at the top of a section and a*/
at the bottom, often including an incorrect number of parentheses or braces. Jasmine has a feature to ignore tests by simply putting anx
in front.A similar feature could be implemented in Uniform to create such behavior. I suggest a
/-
token to declare such behavior. It would look something along the lines of:Which would be functionally equivalent to: