MCPcopy Create free account
hub / github.com/Paxa/postbird / register

Function register

public/codemirror/javascript/javascript.js:292–308  ·  view source on GitHub ↗
(varname)

Source from the content-addressed store, hash-verified

290 return true;
291 }
292 function register(varname) {
293 function inList(list) {
294 for (var v = list; v; v = v.next)
295 if (v.name == varname) return true;
296 return false;
297 }
298 var state = cx.state;
299 cx.marked = "def";
300 if (state.context) {
301 if (inList(state.localVars)) return;
302 state.localVars = {name: varname, next: state.localVars};
303 } else {
304 if (inList(state.globalVars)) return;
305 if (parserConfig.globalVars)
306 state.globalVars = {name: varname, next: state.globalVars};
307 }
308 }
309
310 // Combinators
311

Callers 5

patternFunction · 0.85
proppatternFunction · 0.85
functiondefFunction · 0.85
classNameFunction · 0.85
importSpecFunction · 0.85

Calls 1

inListFunction · 0.85

Tested by

no test coverage detected