| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.resolution.enum_creator; | 5 library dart2js.resolution.enum_creator; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common_elements.dart' show CommonElements; | 8 import '../common_elements.dart' show CommonElements; |
| 9 import '../elements/resolution_types.dart'; | 9 import '../elements/resolution_types.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| 11 import '../elements/modelx.dart'; | 11 import '../elements/modelx.dart'; |
| 12 import 'package:front_end/src/fasta/scanner.dart'; | 12 import 'package:front_end/src/fasta/scanner.dart'; |
| 13 import 'package:front_end/src/scanner/token.dart' show TokenType; | 13 import 'package:front_end/src/scanner/token.dart' show KeywordToken, TokenType; |
| 14 import '../tree/tree.dart'; | 14 import '../tree/tree.dart'; |
| 15 import '../util/util.dart'; | 15 import '../util/util.dart'; |
| 16 | 16 |
| 17 // TODO(johnniwinther): Merge functionality with the `TreePrinter`. | 17 // TODO(johnniwinther): Merge functionality with the `TreePrinter`. |
| 18 class AstBuilder { | 18 class AstBuilder { |
| 19 final int charOffset; | 19 final int charOffset; |
| 20 | 20 |
| 21 AstBuilder(this.charOffset); | 21 AstBuilder(this.charOffset); |
| 22 | 22 |
| 23 Modifiers modifiers( | 23 Modifiers modifiers( |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 EnumMethodElementX toString = new EnumMethodElementX( | 350 EnumMethodElementX toString = new EnumMethodElementX( |
| 351 'toString', enumClass, Modifiers.EMPTY, toStringNode); | 351 'toString', enumClass, Modifiers.EMPTY, toStringNode); |
| 352 FunctionSignatureX toStringSignature = new FunctionSignatureX( | 352 FunctionSignatureX toStringSignature = new FunctionSignatureX( |
| 353 type: new ResolutionFunctionType(toString, stringType)); | 353 type: new ResolutionFunctionType(toString, stringType)); |
| 354 toString.functionSignature = toStringSignature; | 354 toString.functionSignature = toStringSignature; |
| 355 enumClass.addMember(toString, reporter); | 355 enumClass.addMember(toString, reporter); |
| 356 | 356 |
| 357 enumClass.enumValues = enumValues; | 357 enumClass.enumValues = enumValues; |
| 358 } | 358 } |
| 359 } | 359 } |
| OLD | NEW |