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 '../compiler.dart'; |
7 import '../dart_types.dart'; | 8 import '../dart_types.dart'; |
8 import '../dart2jslib.dart'; | |
9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
10 import '../elements/modelx.dart'; | 10 import '../elements/modelx.dart'; |
11 import '../scanner/scannerlib.dart'; | 11 import '../scanner/scannerlib.dart'; |
12 import '../tree/tree.dart'; | 12 import '../tree/tree.dart'; |
13 import '../util/util.dart'; | 13 import '../util/util.dart'; |
14 | 14 |
15 // TODO(johnniwinther): Merge functionality with the `TreePrinter`. | 15 // TODO(johnniwinther): Merge functionality with the `TreePrinter`. |
16 class AstBuilder { | 16 class AstBuilder { |
17 final int charOffset; | 17 final int charOffset; |
18 | 18 |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 EnumMethodElementX toString = new EnumMethodElementX('toString', | 294 EnumMethodElementX toString = new EnumMethodElementX('toString', |
295 enumClass, Modifiers.EMPTY, toStringNode); | 295 enumClass, Modifiers.EMPTY, toStringNode); |
296 FunctionSignatureX toStringSignature = new FunctionSignatureX( | 296 FunctionSignatureX toStringSignature = new FunctionSignatureX( |
297 type: new FunctionType(toString, stringType)); | 297 type: new FunctionType(toString, stringType)); |
298 toString.functionSignatureCache = toStringSignature; | 298 toString.functionSignatureCache = toStringSignature; |
299 enumClass.addMember(toString, compiler); | 299 enumClass.addMember(toString, compiler); |
300 | 300 |
301 enumClass.enumValues = enumValues; | 301 enumClass.enumValues = enumValues; |
302 } | 302 } |
303 } | 303 } |
OLD | NEW |