opendylan icon indicating copy to clipboard operation
opendylan copied to clipboard

Nested comments confuse the reader

Open cgay opened this issue 5 years ago • 2 comments

let x = #[/* // */]; yields Serious warning - Unexpected end of input encountered while reading form.

cgay avatar Jun 28 '20 05:06 cgay

I may have reduced that example a little too much. Although I think that example is valid it's important to note that the real problem was more like let x = #[/* "//" */]. (It was in fact when I commented out several lines of $microsoft-merge-tests which contain the string "//h/a/" among others.)

cgay avatar Jun 28 '20 15:06 cgay

DRM: A single-line comment may appear within a delimited comment; occurrences of slash-star or star-slash within the single line comment are ignored.

I think this means that the first example above is not valid code and correctly produces a warning.

cgay avatar Nov 28 '20 16:11 cgay