Skip to content

Commit 07f06f1

Browse files
IwanKaramazowchenglou
authored andcommitted
Support single line comments of the form // comment (#2254)
* Add support for single line comments of the form // * Fix edge case where // inside a sequence wrapped in braces didn't break. ```reason let x = { // }; ``` If the { }-sequence didn't break we would get parse error: ```reason let x = { // }; ```
1 parent c16a926 commit 07f06f1

File tree

12 files changed

+1558
-7
lines changed

12 files changed

+1558
-7
lines changed

formatTest/unit_tests/expected_output/basicStructures.re

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ let x = arr^[0] = 1;
147147
*============================================================================
148148
*/;
149149

150-
let (/\/) = (+); /* // is not a comment */
150+
let (/++) = (+); /* // indicates the start of a comment, not an infix op */
151151

152152
let something =
153153
if (self.ext.logSuccess) {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// file with just a single line comment

0 commit comments

Comments
 (0)