(value, index)
| 204 | } |
| 205 | |
| 206 | function eatModeChunk(value, index) { |
| 207 | var mode = modes[modes.length - 1]; |
| 208 | if (!mode.terminators) { |
| 209 | mode.terminators = compileTerminators(mode, language); |
| 210 | } |
| 211 | mode.terminators.lastIndex = index; |
| 212 | var match = mode.terminators.exec(value); |
| 213 | if (match) |
| 214 | return [value.substr(index, match.index - index), match[0], false]; |
| 215 | else |
| 216 | return [value.substr(index), '', true]; |
| 217 | } |
| 218 | |
| 219 | function keywordMatch(mode, match) { |
| 220 | var match_str = language.case_insensitive ? match[0].toLowerCase() : match[0] |
no test coverage detected