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 library ddc.src.testing; | 5 library dev_compiler.src.testing; |
6 | 6 |
7 import 'package:analyzer/src/generated/ast.dart'; | 7 import 'package:analyzer/src/generated/ast.dart'; |
8 import 'package:analyzer/src/generated/element.dart'; | 8 import 'package:analyzer/src/generated/element.dart'; |
9 import 'package:analyzer/src/generated/engine.dart' show TimestampedData; | 9 import 'package:analyzer/src/generated/engine.dart' show TimestampedData; |
10 import 'package:analyzer/src/generated/source.dart'; | 10 import 'package:analyzer/src/generated/source.dart'; |
11 import 'package:logging/logging.dart'; | 11 import 'package:logging/logging.dart'; |
12 import 'package:path/path.dart' as path; | 12 import 'package:path/path.dart' as path; |
13 import 'package:source_span/source_span.dart'; | 13 import 'package:source_span/source_span.dart'; |
14 import 'package:unittest/unittest.dart'; | 14 import 'package:unittest/unittest.dart'; |
15 | 15 |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 308 |
309 SourceSpan spanFor(AstNode node) { | 309 SourceSpan spanFor(AstNode node) { |
310 final begin = node is AnnotatedNode | 310 final begin = node is AnnotatedNode |
311 ? node.firstTokenAfterCommentAndMetadata.offset | 311 ? node.firstTokenAfterCommentAndMetadata.offset |
312 : node.offset; | 312 : node.offset; |
313 return _file.span(begin, node.end); | 313 return _file.span(begin, node.end); |
314 } | 314 } |
315 | 315 |
316 String toString() => '[$runtimeType: $uri]'; | 316 String toString() => '[$runtimeType: $uri]'; |
317 } | 317 } |
OLD | NEW |