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

Side by Side Diff: pkg/analyzer/lib/src/generated/incremental_resolution_validator.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_resolution_validator; 5 library engine.incremental_resolution_validator;
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 9
10 /** 10 /**
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 AsExpression other = this.other; 56 AsExpression other = this.other;
57 _visitExpression(node, other); 57 _visitExpression(node, other);
58 _visitNode(node.expression, other.expression); 58 _visitNode(node.expression, other.expression);
59 _visitNode(node.type, other.type); 59 _visitNode(node.type, other.type);
60 } 60 }
61 61
62 @override 62 @override
63 visitAssertStatement(AssertStatement node) { 63 visitAssertStatement(AssertStatement node) {
64 AssertStatement other = this.other; 64 AssertStatement other = this.other;
65 _visitNode(node.condition, other.condition); 65 _visitNode(node.condition, other.condition);
66 _visitNode(node.message, other.message);
66 } 67 }
67 68
68 @override 69 @override
69 visitAssignmentExpression(AssignmentExpression node) { 70 visitAssignmentExpression(AssignmentExpression node) {
70 AssignmentExpression other = this.other; 71 AssignmentExpression other = this.other;
71 _visitExpression(node, other); 72 _visitExpression(node, other);
72 _verifyElement(node.staticElement, other.staticElement); 73 _verifyElement(node.staticElement, other.staticElement);
73 _verifyElement(node.propagatedElement, other.propagatedElement); 74 _verifyElement(node.propagatedElement, other.propagatedElement);
74 _visitNode(node.leftHandSide, other.leftHandSide); 75 _visitNode(node.leftHandSide, other.leftHandSide);
75 _visitNode(node.rightHandSide, other.rightHandSide); 76 _visitNode(node.rightHandSide, other.rightHandSide);
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 * package:project/my_lib.dart -> my_lib.dart 930 * package:project/my_lib.dart -> my_lib.dart
930 */ 931 */
931 static String _getShortElementLocationUri(String uri) { 932 static String _getShortElementLocationUri(String uri) {
932 int index = uri.lastIndexOf('/'); 933 int index = uri.lastIndexOf('/');
933 if (index == -1) { 934 if (index == -1) {
934 return uri; 935 return uri;
935 } 936 }
936 return uri.substring(index + 1); 937 return uri.substring(index + 1);
937 } 938 }
938 } 939 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/generated/html.dart ('k') | pkg/analyzer/lib/src/generated/incremental_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698