MCPcopy Index your code
hub / github.com/feiyu563/PrometheusAlert / tokenNestedExpr

Function tokenNestedExpr

static/plugins/codemirror/mode/python/python.js:190–203  ·  view source on GitHub ↗
(depth)

Source from the content-addressed store, hash-verified

188 var OUTCLASS = "string";
189
190 function tokenNestedExpr(depth) {
191 return function(stream, state) {
192 var inner = tokenBaseInner(stream, state, true)
193 if (inner == "punctuation") {
194 if (stream.current() == "{") {
195 state.tokenize = tokenNestedExpr(depth + 1)
196 } else if (stream.current() == "}") {
197 if (depth > 1) state.tokenize = tokenNestedExpr(depth - 1)
198 else state.tokenize = tokenString
199 }
200 }
201 return inner
202 }
203 }
204
205 function tokenString(stream, state) {
206 while (!stream.eol()) {

Callers 1

tokenStringFunction · 0.85

Calls 1

tokenBaseInnerFunction · 0.85

Tested by

no test coverage detected