Skip to content

Commit

Permalink
[javascript mode] Properly handle exclamation marks in class fields
Browse files Browse the repository at this point in the history
  • Loading branch information
romfrolov authored May 12, 2021
1 parent 472b458 commit c7aeed9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mode/javascript/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,7 @@ CodeMirror.defineMode("javascript", function(config, parserConfig) {
if (value == "@") return cont(expression, classBody)
}
function classfield(type, value) {
if (value == "!") return cont(classfield)
if (value == "?") return cont(classfield)
if (type == ":") return cont(typeexpr, maybeAssign)
if (value == "=") return cont(expressionNoComma)
Expand Down

0 comments on commit c7aeed9

Please sign in to comment.