Lines Matching refs:ast
21 ### `walk(ast, before, after, options)`
23 Traverse and optionally transform a [Pug AST](https://github.com/pugjs/pug-ast-spec).
25 `ast` is not cloned, so any changes done to it will be done directly on the AST provided.
36 * `parents` (array<Node>): Nodes that are ancestors to the current `ast`. This option is used mainl…
48 var ast = parse(lex(source));
50 ast = walk(ast, function before(node, replace) {
62 assert.deepEqual(parse(lex(dest)), ast);
70 var ast = parse(lex(source));
72 ast = walk(ast, function before(node, replace) {
87 assert.deepEqual(parse(lex(dest)), ast);
92 var ast = {
126 ast = walk(ast, null, function after(node, replace) {
133 assert.deepEqual(dest, ast);