(source, setState)
| 147 | } |
| 148 | |
| 149 | function stringLiteral(source, setState) { |
| 150 | while (!source.eol()) { |
| 151 | var ch = source.next(); |
| 152 | if (ch == '"') { |
| 153 | setState(normal); |
| 154 | return "string"; |
| 155 | } |
| 156 | if (ch == '\\') { |
| 157 | if (source.eol() || source.eat(whiteCharRE)) { |
| 158 | setState(stringGap); |
| 159 | return "string"; |
| 160 | } |
| 161 | if (source.eat('&')) { |
| 162 | } |
| 163 | else { |
| 164 | source.next(); // should handle other escapes here |
| 165 | } |
| 166 | } |
| 167 | } |
| 168 | setState(normal); |
| 169 | return "error"; |
| 170 | } |
| 171 | |
| 172 | function stringGap(source, setState) { |
| 173 | if (source.eat('\\')) { |
nothing calls this directly
no test coverage detected