MCPcopy
hub / github.com/witheve/Eve / render

Function render

src/commonmark.js:2612–2627  ·  view source on GitHub ↗

* Walks the AST and calls member methods for each Node type. * * @param ast {Node} The root of the abstract syntax tree.

(ast)

Source from the content-addressed store, hash-verified

2610 * @param ast {Node} The root of the abstract syntax tree.
2611 */
2612function render(ast) {
2613 var walker = ast.walker()
2614 , event
2615 , type;
2616
2617 this.buffer = '';
2618 this.lastOut = '\n';
2619
2620 while((event = walker.next())) {
2621 type = event.node.type;
2622 if (this[type]) {
2623 this[type](event.node, event.entering);
2624 }
2625 }
2626 return this.buffer;
2627}
2628
2629/**
2630 * Concatenate a literal string to the buffer.

Callers

nothing calls this directly

Calls 1

nextMethod · 0.65

Tested by

no test coverage detected