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

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

Issue 1309543011: Add support for assert statements with messages to the analyzer. Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years, 3 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
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 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1243 void _verify(AstNode node) { 1243 void _verify(AstNode node) {
1244 LoggingTimer timer = logger.startTimer(); 1244 LoggingTimer timer = logger.startTimer();
1245 try { 1245 try {
1246 RecordingErrorListener errorListener = new RecordingErrorListener(); 1246 RecordingErrorListener errorListener = new RecordingErrorListener();
1247 ErrorReporter errorReporter = new ErrorReporter(errorListener, _source); 1247 ErrorReporter errorReporter = new ErrorReporter(errorListener, _source);
1248 ErrorVerifier errorVerifier = new ErrorVerifier( 1248 ErrorVerifier errorVerifier = new ErrorVerifier(
1249 errorReporter, 1249 errorReporter,
1250 _definingLibrary, 1250 _definingLibrary,
1251 _typeProvider, 1251 _typeProvider,
1252 new InheritanceManager(_definingLibrary), 1252 new InheritanceManager(_definingLibrary),
1253 _context.analysisOptions.enableSuperMixins); 1253 _context.analysisOptions.enableSuperMixins,
1254 _context.analysisOptions.enableAssertMessage);
1254 if (_resolutionContext.enclosingClassDeclaration != null) { 1255 if (_resolutionContext.enclosingClassDeclaration != null) {
1255 errorVerifier.visitClassDeclarationIncrementally( 1256 errorVerifier.visitClassDeclarationIncrementally(
1256 _resolutionContext.enclosingClassDeclaration); 1257 _resolutionContext.enclosingClassDeclaration);
1257 } 1258 }
1258 node.accept(errorVerifier); 1259 node.accept(errorVerifier);
1259 _verifyErrors = errorListener.getErrorsForSource(_source); 1260 _verifyErrors = errorListener.getErrorsForSource(_source);
1260 } finally { 1261 } finally {
1261 timer.stop('verify'); 1262 timer.stop('verify');
1262 } 1263 }
1263 } 1264 }
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
2024 @override 2025 @override
2025 String toString() => name; 2026 String toString() => name;
2026 } 2027 }
2027 2028
2028 class _TokenPair { 2029 class _TokenPair {
2029 final _TokenDifferenceKind kind; 2030 final _TokenDifferenceKind kind;
2030 final Token oldToken; 2031 final Token oldToken;
2031 final Token newToken; 2032 final Token newToken;
2032 _TokenPair(this.kind, this.oldToken, this.newToken); 2033 _TokenPair(this.kind, this.oldToken, this.newToken);
2033 } 2034 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/incremental_resolution_validator.dart ('k') | pkg/analyzer/lib/src/generated/parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698