| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.parser.partial_elements; | 5 library dart2js.parser.partial_elements; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/resolution.dart' show | 8 import '../common/resolution.dart' show |
| 9 Parsing, | 9 Parsing, |
| 10 Resolution; | 10 Resolution; |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 reusePartialFunctionMixin(); | 230 reusePartialFunctionMixin(); |
| 231 } | 231 } |
| 232 | 232 |
| 233 PartialSetterElement copyWithEnclosing(Element enclosing) { | 233 PartialSetterElement copyWithEnclosing(Element enclosing) { |
| 234 return new PartialSetterElement( | 234 return new PartialSetterElement( |
| 235 name, beginToken, getOrSet, endToken, modifiers, enclosing, | 235 name, beginToken, getOrSet, endToken, modifiers, enclosing, |
| 236 hasBody: hasBody); | 236 hasBody: hasBody); |
| 237 } | 237 } |
| 238 } | 238 } |
| 239 | 239 |
| 240 // TODO(johnniwinther): Create [PartialGenerativeConstructor] and |
| 241 // [PartialFactoryConstructor] subclasses and make this abstract. |
| 240 class PartialConstructorElement extends ConstructorElementX | 242 class PartialConstructorElement extends ConstructorElementX |
| 241 with PartialElement, PartialFunctionMixin { | 243 with PartialElement, PartialFunctionMixin { |
| 242 PartialConstructorElement(String name, | 244 PartialConstructorElement(String name, |
| 243 Token beginToken, | 245 Token beginToken, |
| 244 Token endToken, | 246 Token endToken, |
| 245 ElementKind kind, | 247 ElementKind kind, |
| 246 Modifiers modifiers, | 248 Modifiers modifiers, |
| 247 Element enclosing) | 249 Element enclosing) |
| 248 : super(name, kind, modifiers, enclosing) { | 250 : super(name, kind, modifiers, enclosing) { |
| 249 init(beginToken, null, endToken); | 251 init(beginToken, null, endToken); |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 } on ParserError catch (e) { | 491 } on ParserError catch (e) { |
| 490 partial.hasParseError = true; | 492 partial.hasParseError = true; |
| 491 return new ErrorNode(element.position, e.reason); | 493 return new ErrorNode(element.position, e.reason); |
| 492 } | 494 } |
| 493 Node node = listener.popNode(); | 495 Node node = listener.popNode(); |
| 494 assert(listener.nodes.isEmpty); | 496 assert(listener.nodes.isEmpty); |
| 495 return node; | 497 return node; |
| 496 }); | 498 }); |
| 497 }); | 499 }); |
| 498 } | 500 } |
| OLD | NEW |