(list, end, escapes)
| 19 | |
| 20 | // Helper for phpString |
| 21 | function matchSequence(list, end, escapes) { |
| 22 | if (list.length == 0) return phpString(end); |
| 23 | return function (stream, state) { |
| 24 | var patterns = list[0]; |
| 25 | for (var i = 0; i < patterns.length; i++) if (stream.match(patterns[i][0])) { |
| 26 | state.tokenize = matchSequence(list.slice(1), end); |
| 27 | return patterns[i][1]; |
| 28 | } |
| 29 | state.tokenize = phpString(end, escapes); |
| 30 | return "string"; |
| 31 | }; |
| 32 | } |
| 33 | function phpString(closing, escapes) { |
| 34 | return function(stream, state) { return phpString_(stream, state, closing, escapes); }; |
| 35 | } |
no test coverage detected