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 /// Holds a couple utility functions used at various places in the system. | 5 /// Holds a couple utility functions used at various places in the system. |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import 'package:path/path.dart' as path; | 8 import 'package:path/path.dart' as path; |
9 import 'package:analyzer/src/generated/ast.dart' | 9 import 'package:analyzer/src/generated/ast.dart' |
10 show | 10 show |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 } | 467 } |
468 | 468 |
469 void writeAsStringSync(String file, String contents) { | 469 void writeAsStringSync(String file, String contents) { |
470 _ensureParentExists(file); | 470 _ensureParentExists(file); |
471 new File(file).writeAsStringSync(contents); | 471 new File(file).writeAsStringSync(contents); |
472 } | 472 } |
473 } | 473 } |
474 | 474 |
475 DartType getStaticType(Expression e) => | 475 DartType getStaticType(Expression e) => |
476 e.staticType ?? DynamicTypeImpl.instance; | 476 e.staticType ?? DynamicTypeImpl.instance; |
| 477 |
| 478 // TODO(leafp) Factor this out or use an existing library |
| 479 class Tuple2<T0, T1> { |
| 480 final T0 e0; |
| 481 final T1 e1; |
| 482 Tuple2(this.e0, this.e1); |
| 483 } |
OLD | NEW |