Skip to content

Commit f73c08e

Browse files
authored
Merge pull request #3 from alexfedoseev/line-comments
Line comments
2 parents 9de5b73 + 588e8a8 commit f73c08e

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

grammars/reason.json

+11-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,17 @@
100100
"comment": {
101101
"name": "comment",
102102
"patterns": [
103+
{ "include": "#comment-line" },
103104
{ "include": "#comment-block-doc" },
104-
{ "include": "#comment-block" }
105+
{ "include": "#comment-block" }
106+
]
107+
},
108+
"comment-line": {
109+
"begin": "(^[ \\t]+)?((//))",
110+
"end": "(?=^)",
111+
"name": "comment.line",
112+
"patterns": [
113+
{ "include": "#comment" }
105114
]
106115
},
107116
"comment-block": {
@@ -2276,4 +2285,4 @@
22762285
]
22772286
}
22782287
}
2279-
}
2288+
}

settings/language-reason.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
".source.reason": {
33
"editor": {
4-
"commentStart": "/* ",
5-
"commentEnd": " */",
4+
"commentStart": "// ",
65
"foldEndPattern": "^\\s*\\}|^\\s*\\]|^\\s*\\)",
76
"increaseIndentPattern": "(?x) \\{ [^}\"']* $ | \\[ [^\\]\"']* $ | \\( [^)\"']* $",
87
"decreaseIndentPattern": "(?x) ^ \\s* (\\s* /[*] .* [*]/ \\s*)* [}\\])]",

0 commit comments

Comments
 (0)