Nodes intentionally lack location properties, so they can be mutated, moved, and/or removed with minimal effort. Sometimes, this lack of information makes any code modifications harder to carry out. Transform phases would be much easier with "incremental parsing".
const md = require('markdown-ast')
const parser = md.generator(input)
// The `next` method returns null when EOF is hit.
while (parser.next()) {
// The `next` method updates `node` and `offset`
const {node, offset} = parser
}
Nodes intentionally lack location properties, so they can be mutated, moved, and/or removed with minimal effort. Sometimes, this lack of information makes any code modifications harder to carry out. Transform phases would be much easier with "incremental parsing".