MCPcopy Create free account
hub / github.com/dop251/goja / reinterpretArrayObjectPatternAsBinding

Method reinterpretArrayObjectPatternAsBinding

parser/expression.go:1489–1499  ·  view source on GitHub ↗
(pattern *ast.ObjectPattern)

Source from the content-addressed store, hash-verified

1487}
1488
1489func (self *_parser) reinterpretArrayObjectPatternAsBinding(pattern *ast.ObjectPattern) *ast.ObjectPattern {
1490 for _, prop := range pattern.Properties {
1491 if keyed, ok := prop.(*ast.PropertyKeyed); ok {
1492 keyed.Value = self.reinterpretAsBindingElement(keyed.Value)
1493 }
1494 }
1495 if pattern.Rest != nil {
1496 pattern.Rest = self.reinterpretAsBindingRestElement(pattern.Rest)
1497 }
1498 return pattern
1499}
1500
1501func (self *_parser) reinterpretAsObjectBindingPattern(expr *ast.ObjectLiteral) ast.BindingTarget {
1502 var rest ast.Expression

Callers 1

Tested by

no test coverage detected