(params, kind?: string)
| 2005 | } |
| 2006 | |
| 2007 | parsePatternWithDefault(params, kind?: string): Node.AssignmentPattern | Node.BindingIdentifier | Node.BindingPattern { |
| 2008 | const startToken = this.lookahead; |
| 2009 | |
| 2010 | let pattern = this.parsePattern(params, kind); |
| 2011 | if (this.match('=')) { |
| 2012 | this.nextToken(); |
| 2013 | const previousAllowYield = this.context.allowYield; |
| 2014 | this.context.allowYield = true; |
| 2015 | const right = this.isolateCoverGrammar(this.parseAssignmentExpression); |
| 2016 | this.context.allowYield = previousAllowYield; |
| 2017 | pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right)); |
| 2018 | } |
| 2019 | |
| 2020 | return pattern; |
| 2021 | } |
| 2022 | |
| 2023 | // https://tc39.github.io/ecma262/#sec-variable-statement |
| 2024 |
no test coverage detected