| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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.codes; | 5 library fasta.codes; |
| 6 | 6 |
| 7 import 'package:front_end/src/scanner/token.dart' show Token; | 7 import 'package:front_end/src/scanner/token.dart' show Token; |
| 8 | 8 |
| 9 part 'fasta_codes_generated.dart'; | 9 part 'fasta_codes_generated.dart'; |
| 10 | 10 |
| 11 class FastaCode<T> { | 11 class FastaCode<T> { |
| 12 final String name; |
| 13 |
| 12 final String template; | 14 final String template; |
| 13 | 15 |
| 14 final String tip; | 16 final String tip; |
| 15 | 17 |
| 16 final String analyzerCode; | 18 final String analyzerCode; |
| 17 | 19 |
| 18 final String dart2jsCode; | 20 final String dart2jsCode; |
| 19 | 21 |
| 20 final T format; | 22 final T format; |
| 21 | 23 |
| 22 const FastaCode( | 24 const FastaCode(this.name, |
| 23 {this.template, | 25 {this.template, |
| 24 this.tip, | 26 this.tip, |
| 25 this.analyzerCode, | 27 this.analyzerCode, |
| 26 this.dart2jsCode, | 28 this.dart2jsCode, |
| 27 this.format}); | 29 this.format}); |
| 30 |
| 31 String toString() => name; |
| 28 } | 32 } |
| 29 | 33 |
| 30 class FastaMessage { | 34 class FastaMessage { |
| 31 final Uri uri; | 35 final Uri uri; |
| 32 | 36 |
| 33 final int charOffset; | 37 final int charOffset; |
| 34 | 38 |
| 35 final String message; | 39 final String message; |
| 36 | 40 |
| 37 final String tip; | 41 final String tip; |
| 38 | 42 |
| 39 final FastaCode code; | 43 final FastaCode code; |
| 40 | 44 |
| 41 final Map<String, dynamic> arguments; | 45 final Map<String, dynamic> arguments; |
| 42 | 46 |
| 43 const FastaMessage(this.uri, this.charOffset, this.code, | 47 const FastaMessage(this.uri, this.charOffset, this.code, |
| 44 {this.message, this.tip, this.arguments}); | 48 {this.message, this.tip, this.arguments}); |
| 45 } | 49 } |
| OLD | NEW |