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

Side by Side Diff: pkg/analyzer/lib/src/generated/incremental_resolver.dart

Issue 1480433002: Add support for assert statements with messages to the analyzer. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
OLDNEW
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 engine.incremental_resolver; 5 library engine.incremental_resolver;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' as math; 8 import 'dart:math' as math;
9 9
10 import 'package:analyzer/src/context/cache.dart' 10 import 'package:analyzer/src/context/cache.dart'
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1382 void _verify(AstNode node) { 1382 void _verify(AstNode node) {
1383 LoggingTimer timer = logger.startTimer(); 1383 LoggingTimer timer = logger.startTimer();
1384 try { 1384 try {
1385 RecordingErrorListener errorListener = new RecordingErrorListener(); 1385 RecordingErrorListener errorListener = new RecordingErrorListener();
1386 ErrorReporter errorReporter = new ErrorReporter(errorListener, _source); 1386 ErrorReporter errorReporter = new ErrorReporter(errorListener, _source);
1387 ErrorVerifier errorVerifier = new ErrorVerifier( 1387 ErrorVerifier errorVerifier = new ErrorVerifier(
1388 errorReporter, 1388 errorReporter,
1389 _definingLibrary, 1389 _definingLibrary,
1390 _typeProvider, 1390 _typeProvider,
1391 new InheritanceManager(_definingLibrary), 1391 new InheritanceManager(_definingLibrary),
1392 _context.analysisOptions.enableSuperMixins); 1392 _context.analysisOptions.enableSuperMixins,
1393 _context.analysisOptions.enableAssertMessage);
1393 if (_resolutionContext.enclosingClassDeclaration != null) { 1394 if (_resolutionContext.enclosingClassDeclaration != null) {
1394 errorVerifier.visitClassDeclarationIncrementally( 1395 errorVerifier.visitClassDeclarationIncrementally(
1395 _resolutionContext.enclosingClassDeclaration); 1396 _resolutionContext.enclosingClassDeclaration);
1396 } 1397 }
1397 node.accept(errorVerifier); 1398 node.accept(errorVerifier);
1398 _verifyErrors = errorListener.getErrorsForSource(_source); 1399 _verifyErrors = errorListener.getErrorsForSource(_source);
1399 } finally { 1400 } finally {
1400 timer.stop('verify'); 1401 timer.stop('verify');
1401 } 1402 }
1402 } 1403 }
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
2154 @override 2155 @override
2155 String toString() => name; 2156 String toString() => name;
2156 } 2157 }
2157 2158
2158 class _TokenPair { 2159 class _TokenPair {
2159 final _TokenDifferenceKind kind; 2160 final _TokenDifferenceKind kind;
2160 final Token oldToken; 2161 final Token oldToken;
2161 final Token newToken; 2162 final Token newToken;
2162 _TokenPair(this.kind, this.oldToken, this.newToken); 2163 _TokenPair(this.kind, this.oldToken, this.newToken);
2163 } 2164 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698