Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: pkg/analyzer/lib/src/services/runtime/coverage/coverage_impl.dart

Issue 185603002: Update and analyzer snapshot with AST -> Ast rename. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak for analyzer version in 'intl' package. Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /// A library for code coverage support for Dart. 5 /// A library for code coverage support for Dart.
6 library runtime.coverage.impl; 6 library runtime.coverage.impl;
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:collection' show SplayTreeMap; 9 import 'dart:collection' show SplayTreeMap;
10 import 'dart:io'; 10 import 'dart:io';
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 var parser = new Parser(source, errorListener); 247 var parser = new Parser(source, errorListener);
248 var reader = new CharSequenceReader(code); 248 var reader = new CharSequenceReader(code);
249 var scanner = new Scanner(null, reader, errorListener); 249 var scanner = new Scanner(null, reader, errorListener);
250 var token = scanner.tokenize(); 250 var token = scanner.tokenize();
251 return parser.parseCompilationUnit(token); 251 return parser.parseCompilationUnit(token);
252 } 252 }
253 } 253 }
254 254
255 255
256 /// The visitor that inserts `touch` method invocations. 256 /// The visitor that inserts `touch` method invocations.
257 class InsertTouchInvocationsVisitor extends GeneralizingASTVisitor { 257 class InsertTouchInvocationsVisitor extends GeneralizingAstVisitor {
258 final AppInfo appInfo; 258 final AppInfo appInfo;
259 final CodeInjector injector; 259 final CodeInjector injector;
260 260
261 InsertTouchInvocationsVisitor(this.appInfo, this.injector); 261 InsertTouchInvocationsVisitor(this.appInfo, this.injector);
262 262
263 visitClassDeclaration(ClassDeclaration node) { 263 visitClassDeclaration(ClassDeclaration node) {
264 appInfo.enter('class', node.name.name); 264 appInfo.enter('class', node.name.name);
265 super.visitClassDeclaration(node); 265 super.visitClassDeclaration(node);
266 appInfo.leave(); 266 appInfo.leave();
267 } 267 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 var lastOffset = 0; 330 var lastOffset = 0;
331 offsetFragmentMap.forEach((offset, fragment) { 331 offsetFragmentMap.forEach((offset, fragment) {
332 sb.write(_code.substring(lastOffset, offset)); 332 sb.write(_code.substring(lastOffset, offset));
333 sb.write(fragment); 333 sb.write(fragment);
334 lastOffset = offset; 334 lastOffset = offset;
335 }); 335 });
336 sb.write(_code.substring(lastOffset, _code.length)); 336 sb.write(_code.substring(lastOffset, _code.length));
337 return sb.toString(); 337 return sb.toString();
338 } 338 }
339 } 339 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698