(start file.Idx, async bool)
| 1202 | } |
| 1203 | |
| 1204 | func (self *_parser) parseSingleArgArrowFunction(start file.Idx, async bool) ast.Expression { |
| 1205 | if async != self.scope.allowAwait { |
| 1206 | self.scope.allowAwait = async |
| 1207 | defer func() { |
| 1208 | self.scope.allowAwait = !async |
| 1209 | }() |
| 1210 | } |
| 1211 | self.tokenToBindingId() |
| 1212 | if self.token != token.IDENTIFIER { |
| 1213 | self.errorUnexpectedToken(self.token) |
| 1214 | self.next() |
| 1215 | return &ast.BadExpression{ |
| 1216 | From: start, |
| 1217 | To: self.idx, |
| 1218 | } |
| 1219 | } |
| 1220 | |
| 1221 | id := self.parseIdentifier() |
| 1222 | |
| 1223 | paramList := &ast.ParameterList{ |
| 1224 | Opening: id.Idx, |
| 1225 | Closing: id.Idx1(), |
| 1226 | List: []*ast.Binding{{ |
| 1227 | Target: id, |
| 1228 | }}, |
| 1229 | } |
| 1230 | |
| 1231 | return self.parseArrowFunction(start, paramList, async) |
| 1232 | } |
| 1233 | |
| 1234 | func (self *_parser) parseAssignmentExpression() ast.Expression { |
| 1235 | start := self.idx |
no test coverage detected