Inline function to push mappings
This commit is contained in:
parent
1992ba55ab
commit
58932d5a25
1 changed files with 2 additions and 4 deletions
|
|
@ -90,7 +90,7 @@ export function createSourceMap({ ast }: { ast: AstNode[] }) {
|
|||
}
|
||||
|
||||
// Get all the indexes from the mappings
|
||||
function add(node: AstNode) {
|
||||
walk(ast, (node: AstNode) => {
|
||||
if (!node.src || !node.dst) return
|
||||
|
||||
let originalSource = sourceTable.get(node.src[0])
|
||||
|
|
@ -141,9 +141,7 @@ export function createSourceMap({ ast }: { ast: AstNode[] }) {
|
|||
},
|
||||
generatedPosition: generatedEnd,
|
||||
})
|
||||
}
|
||||
|
||||
walk(ast, add)
|
||||
})
|
||||
|
||||
// Populate
|
||||
for (let source of lineTables.keys()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue