MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / tokenString

Function tokenString

lib/web/CodeMirror/mode/css/css.js:94–107  ·  view source on GitHub ↗
(quote)

Source from the content-addressed store, hash-verified

92 }
93
94 function tokenString(quote) {
95 return function(stream, state) {
96 var escaped = false, ch;
97 while ((ch = stream.next()) != null) {
98 if (ch == quote && !escaped) {
99 if (quote == ")") stream.backUp(1);
100 break;
101 }
102 escaped = !escaped && ch == "\\";
103 }
104 if (ch == quote || !escaped && quote != ")") state.tokenize = null;
105 return ret("string", "string");
106 };
107 }
108
109 function tokenParenthesized(stream, state) {
110 stream.next(); // Must be '('

Callers 2

tokenBaseFunction · 0.70
tokenParenthesizedFunction · 0.70

Calls 3

backUpMethod · 0.80
retFunction · 0.70
nextMethod · 0.65

Tested by

no test coverage detected