We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ccacc38 commit 264ba93Copy full SHA for 264ba93
mode/swift/swift.js
@@ -143,14 +143,12 @@
143
144
function tokenComment(stream, state) {
145
var ch
146
- while (true) {
147
- stream.match(/^[^/*]+/, true)
148
- ch = stream.next()
149
- if (!ch) break
+ while (ch = stream.next()) {
150
if (ch === "/" && stream.eat("*")) {
151
state.tokenize.push(tokenComment)
152
} else if (ch === "*" && stream.eat("/")) {
153
state.tokenize.pop()
+ break
154
}
155
156
return "comment"
0 commit comments