Skip to content

Commit 650e975

Browse files
AlexanderPrendotamarijnh
authored andcommitted
[clike] support nested comments in kotlin mode
1 parent ad0daf2 commit 650e975

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mode/clike/clike.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -676,6 +676,11 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
676676
state.tokenize = tokenKotlinString(stream.match('""'));
677677
return state.tokenize(stream, state);
678678
},
679+
"/": function(stream, state) {
680+
if (!stream.eat("*")) return false;
681+
state.tokenize = tokenNestedComment(1);
682+
return state.tokenize(stream, state)
683+
},
679684
indent: function(state, ctx, textAfter, indentUnit) {
680685
var firstChar = textAfter && textAfter.charAt(0);
681686
if ((state.prevToken == "}" || state.prevToken == ")") && textAfter == "")

0 commit comments

Comments
 (0)