| 386 | } |
| 387 | |
| 388 | function parse(state, stream, style) { |
| 389 | var cc = state.cc; |
| 390 | // Communicate our context to the combinators. |
| 391 | // (Less wasteful than consing up a hundred closures on every call.) |
| 392 | cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; |
| 393 | |
| 394 | while (true) { |
| 395 | var combinator = cc.length ? cc.pop() : block; |
| 396 | if (combinator(tcat)) { |
| 397 | while(cc.length && cc[cc.length - 1].lex) |
| 398 | cc.pop()(); |
| 399 | return cx.marked || style; |
| 400 | } |
| 401 | } |
| 402 | } |
| 403 | |
| 404 | return { |
| 405 | startState: function() { |