(stream, state)
| 227 | |
| 228 | // handle comments, including nested |
| 229 | function tokenComment(stream, state) { |
| 230 | var maybeEnd = false, maybeNested = false, nestedCount = 0, ch; |
| 231 | while (ch = stream.next()) { |
| 232 | if (ch == ")" && maybeEnd) { |
| 233 | if(nestedCount > 0) |
| 234 | nestedCount--; |
| 235 | else { |
| 236 | popStateStack(state); |
| 237 | break; |
| 238 | } |
| 239 | } |
| 240 | else if(ch == ":" && maybeNested) { |
| 241 | nestedCount++; |
| 242 | } |
| 243 | maybeEnd = (ch == ":"); |
| 244 | maybeNested = (ch == "("); |
| 245 | } |
| 246 | |
| 247 | return ret("comment", "comment"); |
| 248 | } |
| 249 | |
| 250 | // tokenizer for string literals |
| 251 | // optionally pass a tokenizer function to set state.tokenize back to when finished |
nothing calls this directly
no test coverage detected