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

Function parseHaxe

static/editor.md/lib/codemirror/mode/haxe/haxe.js:163–183  ·  view source on GitHub ↗
(state, style, type, content, stream)

Source from the content-addressed store, hash-verified

161 }
162
163 function parseHaxe(state, style, type, content, stream) {
164 var cc = state.cc;
165 // Communicate our context to the combinators.
166 // (Less wasteful than consing up a hundred closures on every call.)
167 cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
168
169 if (!state.lexical.hasOwnProperty("align"))
170 state.lexical.align = true;
171
172 while(true) {
173 var combinator = cc.length ? cc.pop() : statement;
174 if (combinator(type, content)) {
175 while(cc.length && cc[cc.length - 1].lex)
176 cc.pop()();
177 if (cx.marked) return cx.marked;
178 if (type == "variable" && inScope(state, content)) return "variable-2";
179 if (type == "variable" && imported(state, content)) return "variable-3";
180 return style;
181 }
182 }
183 }
184
185 function imported(state, typename)
186 {

Callers 1

haxe.jsFile · 0.85

Calls 2

importedFunction · 0.85
inScopeFunction · 0.70

Tested by

no test coverage detected