()
| 1170 | } |
| 1171 | |
| 1172 | func (self *_parser) parseConditionalExpression() ast.Expression { |
| 1173 | left := self.parseLogicalOrExpression() |
| 1174 | |
| 1175 | if self.token == token.QUESTION_MARK { |
| 1176 | self.next() |
| 1177 | allowIn := self.scope.allowIn |
| 1178 | self.scope.allowIn = true |
| 1179 | consequent := self.parseAssignmentExpression() |
| 1180 | self.scope.allowIn = allowIn |
| 1181 | self.expect(token.COLON) |
| 1182 | return &ast.ConditionalExpression{ |
| 1183 | Test: left, |
| 1184 | Consequent: consequent, |
| 1185 | Alternate: self.parseAssignmentExpression(), |
| 1186 | } |
| 1187 | } |
| 1188 | |
| 1189 | return left |
| 1190 | } |
| 1191 | |
| 1192 | func (self *_parser) parseArrowFunction(start file.Idx, paramList *ast.ParameterList, async bool) ast.Expression { |
| 1193 | self.expect(token.ARROW) |
no test coverage detected