src/highlighter.c

changeset 53
5e47a26a16f0
parent 52
33ded421c512
child 54
b3f24e23bc25
equal deleted inserted replaced
52:33ded421c512 53:5e47a26a16f0
124 } 124 }
125 125
126 char c; 126 char c;
127 do { 127 do {
128 c = src[++sp]; 128 c = src[++sp];
129 if (!c) break; 129 if (!c) {
130 /* TODO: might cause problems if code file does not end with NL */
131 break;
132 }
130 133
131 /* comments */ 134 /* comments */
132 if (!isstring && c == '/') { 135 if (!isstring && c == '/') {
133 if (hd->multiline_comment && sp > 0 && src[sp-1] == '*') { 136 if (hd->multiline_comment && sp > 0 && src[sp-1] == '*') {
134 iscomment = 0; 137 iscomment = 0;
266 } 269 }
267 270
268 char c; 271 char c;
269 do { 272 do {
270 c = src[++sp]; 273 c = src[++sp];
271 if (!c) break; 274 if (!c) {
275 /* TODO: might cause problems if code file does not end with NL */
276 break;
277 }
272 278
273 /* comments */ 279 /* comments */
274 if (!isstring && c == '/') { 280 if (!isstring && c == '/') {
275 if (hd->multiline_comment && sp > 0 && src[sp-1] == '*') { 281 if (hd->multiline_comment && sp > 0 && src[sp-1] == '*') {
276 iscomment = 0; 282 iscomment = 0;

mercurial