(state, style, type, content, stream)
| 165 | } |
| 166 | |
| 167 | function parseJS(state, style, type, content, stream) { |
| 168 | var cc = state.cc; |
| 169 | // Communicate our context to the combinators. |
| 170 | // (Less wasteful than consing up a hundred closures on every call.) |
| 171 | cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; |
| 172 | |
| 173 | if (!state.lexical.hasOwnProperty("align")) |
| 174 | state.lexical.align = true; |
| 175 | |
| 176 | while(true) { |
| 177 | var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; |
| 178 | if (combinator(type, content)) { |
| 179 | while(cc.length && cc[cc.length - 1].lex) |
| 180 | cc.pop()(); |
| 181 | if (cx.marked) return cx.marked; |
| 182 | if (type == "variable" && inScope(state, content)) return "variable-2"; |
| 183 | return style; |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | // Combinator utils |
| 189 |
no test coverage detected
searching dependent graphs…