We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 84a02bc commit 840464bCopy full SHA for 840464b
1 file changed
mode/pascal/pascal.js
@@ -50,7 +50,11 @@ CodeMirror.defineMode("pascal", function() {
50
state.tokenize = tokenComment;
51
return tokenComment(stream, state);
52
}
53
- if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
+ if (ch == "{") {
54
+ state.tokenize = tokenCommentBraces;
55
+ return tokenCommentBraces(stream, state);
56
+ }
57
+ if (/[\[\]\(\),;\:\.]/.test(ch)) {
58
return null;
59
60
if (/\d/.test(ch)) {
@@ -98,6 +102,17 @@ CodeMirror.defineMode("pascal", function() {
98
102
return "comment";
99
103
100
104
105
+ function tokenCommentBraces(stream, state) {
106
+ var ch;
107
+ while (ch = stream.next()) {
108
+ if (ch == "}") {
109
+ state.tokenize = null;
110
+ break;
111
112
113
+ return "comment";
114
115
+
101
116
// Interface
117
118
return {
0 commit comments