This commit is contained in:
Julian Rosse
2018-09-25 22:03:40 -04:00
parent 6b1e9bb82b
commit 1bbbca6496
2 changed files with 6 additions and 0 deletions

View File

@@ -1754,6 +1754,9 @@
optional: !!prop.soak,
shorthand: !!prop.shorthand
};
// When the `Value` has properties, the location data of a `MemberExpression` AST node
// corresponding to a given property should span the location of the `Value`'s `base`
// (including parens if present) through the property's location
Object.assign(ret, mergeAstLocationData(this.base.astLocationData(), prop.astLocationData()));
}
return ret;

View File

@@ -1160,6 +1160,9 @@ exports.Value = class Value extends Base
computed: prop instanceof Index or prop.name?.unwrap() not instanceof PropertyName
optional: !!prop.soak
shorthand: !!prop.shorthand
# When the `Value` has properties, the location data of a `MemberExpression` AST node
# corresponding to a given property should span the location of the `Value`'s `base`
# (including parens if present) through the property's location
Object.assign ret, mergeAstLocationData(@base.astLocationData(), prop.astLocationData())
ret