| 373 | } |
| 374 | |
| 375 | function parse(state, stream, style) { |
| 376 | var cc = state.cc; |
| 377 | // Communicate our context to the combinators. |
| 378 | // (Less wasteful than consing up a hundred closures on every call.) |
| 379 | cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; |
| 380 | |
| 381 | while (true) { |
| 382 | var combinator = cc.length ? cc.pop() : block; |
| 383 | if (combinator(tcat)) { |
| 384 | while(cc.length && cc[cc.length - 1].lex) |
| 385 | cc.pop()(); |
| 386 | return cx.marked || style; |
| 387 | } |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | return { |
| 392 | startState: function() { |