Ignore duplicate mappings in SourceMapGenerator.prototype.addMapping #21

Closed
fitzgen opened this Issue Sep 5, 2012 · 1 comment

Comments

Projects
None yet
1 participant
@fitzgen
Member

fitzgen commented Sep 5, 2012

Quoting @mishoo:

Let's take this statement: a = 1, the AST
hierarchy for it is something like:

AST_SimpleStatement {
body: AST_Assign {
left: AST_SymbolRef (a)
operator: "="
right: AST_Number (1)
}
}

If I output mapping for all nodes, we'll have a duplicate because the
AST_SimpleStatement's start token is a, which is the same start
token in fact for the AST_Assign and for the AST_SymbolRef. So I'd
output, say, 0,0->0,0 (name: "a") three times.

@fitzgen

This comment has been minimized.

Show comment Hide comment
@fitzgen

fitzgen Apr 4, 2013

Member

Fixed in 7c3d49b

Member

fitzgen commented Apr 4, 2013

Fixed in 7c3d49b

@fitzgen fitzgen closed this Apr 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment