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