| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 fasta.source_loader; | 5 library fasta.source_loader; |
| 6 | 6 |
| 7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'dart:typed_data' show Uint8List; | 9 import 'dart:typed_data' show Uint8List; |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 show | 25 show |
| 26 Builder, | 26 Builder, |
| 27 ClassBuilder, | 27 ClassBuilder, |
| 28 EnumBuilder, | 28 EnumBuilder, |
| 29 LibraryBuilder, | 29 LibraryBuilder, |
| 30 NamedTypeBuilder, | 30 NamedTypeBuilder, |
| 31 TypeBuilder; | 31 TypeBuilder; |
| 32 | 32 |
| 33 import '../compiler_context.dart' show CompilerContext; | 33 import '../compiler_context.dart' show CompilerContext; |
| 34 | 34 |
| 35 import '../deprecated_problems.dart' | 35 import '../deprecated_problems.dart' show deprecated_inputError; |
| 36 show deprecated_formatUnexpected, deprecated_inputError; | |
| 37 | 36 |
| 38 import '../export.dart' show Export; | 37 import '../export.dart' show Export; |
| 39 | 38 |
| 40 import '../fasta_codes.dart' | 39 import '../fasta_codes.dart' |
| 41 show | 40 show |
| 42 Message, | 41 Message, |
| 43 templateCyclicClassHierarchy, | 42 templateCyclicClassHierarchy, |
| 44 templateExtendingEnum, | 43 templateExtendingEnum, |
| 45 templateExtendingRestricted, | 44 templateExtendingRestricted, |
| 46 templateIllegalMixin, | 45 templateIllegalMixin, |
| 47 templateIllegalMixinDueToConstructors, | 46 templateIllegalMixinDueToConstructors, |
| 48 templateIllegalMixinDueToConstructorsCause, | 47 templateIllegalMixinDueToConstructorsCause, |
| 49 templateUnspecified; | 48 templateUnspecified; |
| 50 | 49 |
| 51 import '../kernel/kernel_shadow_ast.dart' show KernelTypeInferenceEngine; | 50 import '../kernel/kernel_shadow_ast.dart' show KernelTypeInferenceEngine; |
| 52 | 51 |
| 53 import '../kernel/kernel_target.dart' show KernelTarget; | 52 import '../kernel/kernel_target.dart' show KernelTarget; |
| 54 | 53 |
| 55 import '../loader.dart' show Loader; | 54 import '../loader.dart' show Loader; |
| 56 | 55 |
| 57 import '../parser/class_member_parser.dart' show ClassMemberParser; | 56 import '../parser/class_member_parser.dart' show ClassMemberParser; |
| 58 | 57 |
| 59 import '../scanner.dart' show ErrorToken, ScannerResult, Token, scan; | 58 import '../scanner.dart' show ErrorToken, ScannerResult, Token, scan; |
| 60 | 59 |
| 60 import '../severity.dart' show Severity; |
| 61 |
| 61 import '../type_inference/type_inference_engine.dart' show TypeInferenceEngine; | 62 import '../type_inference/type_inference_engine.dart' show TypeInferenceEngine; |
| 62 | 63 |
| 63 import 'diet_listener.dart' show DietListener; | 64 import 'diet_listener.dart' show DietListener; |
| 64 | 65 |
| 65 import 'diet_parser.dart' show DietParser; | 66 import 'diet_parser.dart' show DietParser; |
| 66 | 67 |
| 67 import 'outline_builder.dart' show OutlineBuilder; | 68 import 'outline_builder.dart' show OutlineBuilder; |
| 68 | 69 |
| 69 import 'source_class_builder.dart' show SourceClassBuilder; | 70 import 'source_class_builder.dart' show SourceClassBuilder; |
| 70 | 71 |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 isStatic: isStatic, | 524 isStatic: isStatic, |
| 524 isConstructor: isConstructor, | 525 isConstructor: isConstructor, |
| 525 isTopLevel: isTopLevel); | 526 isTopLevel: isTopLevel); |
| 526 } | 527 } |
| 527 | 528 |
| 528 Expression throwCompileConstantError(Expression error) { | 529 Expression throwCompileConstantError(Expression error) { |
| 529 return target.backendTarget.throwCompileConstantError(coreTypes, error); | 530 return target.backendTarget.throwCompileConstantError(coreTypes, error); |
| 530 } | 531 } |
| 531 | 532 |
| 532 Expression buildCompileTimeError(Message message, int offset, Uri uri) { | 533 Expression buildCompileTimeError(Message message, int offset, Uri uri) { |
| 533 String text = deprecated_formatUnexpected(uri, offset, message.message); | 534 String text = target.context |
| 535 .format(message.withLocation(uri, offset), Severity.error); |
| 534 return target.backendTarget.buildCompileTimeError(coreTypes, text, offset); | 536 return target.backendTarget.buildCompileTimeError(coreTypes, text, offset); |
| 535 } | 537 } |
| 536 } | 538 } |
| OLD | NEW |