MCPcopy Index your code
hub / github.com/pandao/editor.md / pushScope

Function pushScope

lib/codemirror/mode/python/python.js:226–236  ·  view source on GitHub ↗
(stream, state, type)

Source from the content-addressed store, hash-verified

224 }
225
226 function pushScope(stream, state, type) {
227 var offset = 0, align = null;
228 if (type == "py") {
229 while (top(state).type != "py")
230 state.scopes.pop();
231 }
232 offset = top(state).offset + (type == "py" ? conf.indentUnit : hangingIndent);
233 if (type != "py" && !stream.match(/^(\s|#.*)*$/, false))
234 align = stream.column() + 1;
235 state.scopes.push({offset: offset, type: type, align: align});
236 }
237
238 function dedent(stream, state) {
239 var indented = stream.indentation();

Callers 2

tokenBaseFunction · 0.85
tokenLexerFunction · 0.85

Calls 1

topFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…