* Apply the given language handler to sourceCode and add the resulting * decorations to out. * @param {number} basePos the index of sourceCode within the chunk of source * whose decorations are already present on out.
(basePos, sourceCode, langHandler, out)
| 572 | * whose decorations are already present on out. |
| 573 | */ |
| 574 | function appendDecorations(basePos, sourceCode, langHandler, out) { |
| 575 | if (!sourceCode) { return; } |
| 576 | var job = { |
| 577 | sourceCode: sourceCode, |
| 578 | basePos: basePos |
| 579 | }; |
| 580 | langHandler(job); |
| 581 | out.push.apply(out, job.decorations); |
| 582 | } |
| 583 | |
| 584 | var notWs = /\S/; |
| 585 |