| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 part of dart2js; | |
| 6 | |
| 7 class Script { | 5 class Script { |
| 8 // TODO(kasperl): Once MockFile in tests/compiler/dart2js/parser_helper.dart | 6 // TODO(kasperl): Once MockFile in tests/compiler/dart2js/parser_helper.dart |
| 9 // implements SourceFile, we should be able to type the [file] field as | 7 // implements SourceFile, we should be able to type the [file] field as |
| 10 // such. | 8 // such. |
| 11 final file; | 9 final file; |
| 12 final Uri uri; | 10 final Uri uri; |
| 13 Script(this.uri, this.file); | 11 Script(this.uri, this.file); |
| 14 | 12 |
| 15 String get text => (file == null) ? null : file.text; | 13 String get text => (file == null) ? null : file.text; |
| 16 String get name => (file == null) ? null : file.filename; | 14 String get name => (file == null) ? null : file.filename; |
| 17 } | 15 } |
| OLD | NEW |