uniform-team / Uniform-Validation-Language

A logic language to simplify and improve online form validation.
Apache License 2.0
1 stars 0 forks source link

Block Comment #19

Open dgp1130 opened 8 years ago

dgp1130 commented 8 years ago

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
}