| 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 ParsingContext, Resolution; | 8 import '../common/resolution.dart' show ParsingContext, Resolution; |
| 9 import '../elements/resolution_types.dart' show ResolutionDynamicType; | 9 import '../elements/resolution_types.dart' show ResolutionDynamicType; |
| 10 import '../elements/elements.dart' | 10 import '../elements/elements.dart' |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 NodeListener listener = new NodeListener( | 444 NodeListener listener = new NodeListener( |
| 445 parsing.getScannerOptionsFor(element), reporter, unit); | 445 parsing.getScannerOptionsFor(element), reporter, unit); |
| 446 listener.memberErrors = listener.memberErrors.prepend(false); | 446 listener.memberErrors = listener.memberErrors.prepend(false); |
| 447 try { | 447 try { |
| 448 if (partial.hasParseError) { | 448 if (partial.hasParseError) { |
| 449 listener.suppressParseErrors = true; | 449 listener.suppressParseErrors = true; |
| 450 } | 450 } |
| 451 doParse(new Parser(listener)); | 451 doParse(new Parser(listener)); |
| 452 } on ParserError catch (e) { | 452 } on ParserError catch (e) { |
| 453 partial.hasParseError = true; | 453 partial.hasParseError = true; |
| 454 return new ErrorNode(element.position, e.kind, e.arguments); | 454 return new ErrorNode(element.position, e.message); |
| 455 } | 455 } |
| 456 Node node = listener.popNode(); | 456 Node node = listener.popNode(); |
| 457 assert(listener.nodes.isEmpty); | 457 assert(listener.nodes.isEmpty); |
| 458 return node; | 458 return node; |
| 459 }); | 459 }); |
| 460 }); | 460 }); |
| 461 } | 461 } |
| OLD | NEW |