MCPcopy Create free account
hub / github.com/TruthHun/BookStack / stringLiteral

Function stringLiteral

static/editor.md/lib/codemirror/mode/haskell/haskell.js:149–170  ·  view source on GitHub ↗
(source, setState)

Source from the content-addressed store, hash-verified

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('\\')) {

Callers

nothing calls this directly

Calls 1

setStateFunction · 0.85

Tested by

no test coverage detected