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

Side by Side Diff: pkg/analyzer/lib/dart/ast/visitor.dart

Issue 2492633002: Create AST structure for asserts in constructor initializers (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /** 5 /**
6 * Defines AST visitors that support useful patterns for visiting the nodes in 6 * Defines AST visitors that support useful patterns for visiting the nodes in
7 * an [AST structure](ast.dart). 7 * an [AST structure](ast.dart).
8 * 8 *
9 * Dart is an evolving language, and the AST structure must evolved with it. 9 * Dart is an evolving language, and the AST structure must evolved with it.
10 * When the AST structure changes, the visitor interface will sometimes change 10 * When the AST structure changes, the visitor interface will sometimes change
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 @override 158 @override
159 R visitAnnotation(Annotation node) => visitNode(node); 159 R visitAnnotation(Annotation node) => visitNode(node);
160 160
161 @override 161 @override
162 R visitArgumentList(ArgumentList node) => visitNode(node); 162 R visitArgumentList(ArgumentList node) => visitNode(node);
163 163
164 @override 164 @override
165 R visitAsExpression(AsExpression node) => visitExpression(node); 165 R visitAsExpression(AsExpression node) => visitExpression(node);
166 166
167 @override 167 @override
168 R visitAssertInitializer(AssertInitializer node) => visitNode(node);
169
170 @override
168 R visitAssertStatement(AssertStatement node) => visitStatement(node); 171 R visitAssertStatement(AssertStatement node) => visitStatement(node);
169 172
170 @override 173 @override
171 R visitAssignmentExpression(AssignmentExpression node) => 174 R visitAssignmentExpression(AssignmentExpression node) =>
172 visitExpression(node); 175 visitExpression(node);
173 176
174 @override 177 @override
175 R visitAwaitExpression(AwaitExpression node) => visitExpression(node); 178 R visitAwaitExpression(AwaitExpression node) => visitExpression(node);
176 179
177 @override 180 @override
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 return null; 593 return null;
591 } 594 }
592 595
593 @override 596 @override
594 R visitAsExpression(AsExpression node) { 597 R visitAsExpression(AsExpression node) {
595 node.visitChildren(this); 598 node.visitChildren(this);
596 return null; 599 return null;
597 } 600 }
598 601
599 @override 602 @override
603 R visitAssertInitializer(AssertInitializer node) {
604 node.visitChildren(this);
605 return null;
606 }
607
608 @override
600 R visitAssertStatement(AssertStatement node) { 609 R visitAssertStatement(AssertStatement node) {
601 node.visitChildren(this); 610 node.visitChildren(this);
602 return null; 611 return null;
603 } 612 }
604 613
605 @override 614 @override
606 R visitAssignmentExpression(AssignmentExpression node) { 615 R visitAssignmentExpression(AssignmentExpression node) {
607 node.visitChildren(this); 616 node.visitChildren(this);
608 return null; 617 return null;
609 } 618 }
(...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 @override 1246 @override
1238 R visitAnnotation(Annotation node) => null; 1247 R visitAnnotation(Annotation node) => null;
1239 1248
1240 @override 1249 @override
1241 R visitArgumentList(ArgumentList node) => null; 1250 R visitArgumentList(ArgumentList node) => null;
1242 1251
1243 @override 1252 @override
1244 R visitAsExpression(AsExpression node) => null; 1253 R visitAsExpression(AsExpression node) => null;
1245 1254
1246 @override 1255 @override
1256 R visitAssertInitializer(AssertInitializer node) => null;
1257
1258 @override
1247 R visitAssertStatement(AssertStatement node) => null; 1259 R visitAssertStatement(AssertStatement node) => null;
1248 1260
1249 @override 1261 @override
1250 R visitAssignmentExpression(AssignmentExpression node) => null; 1262 R visitAssignmentExpression(AssignmentExpression node) => null;
1251 1263
1252 @override 1264 @override
1253 R visitAwaitExpression(AwaitExpression node) => null; 1265 R visitAwaitExpression(AwaitExpression node) => null;
1254 1266
1255 @override 1267 @override
1256 R visitBinaryExpression(BinaryExpression node) => null; 1268 R visitBinaryExpression(BinaryExpression node) => null;
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
1609 1621
1610 @override 1622 @override
1611 T visitAsExpression(AsExpression node) { 1623 T visitAsExpression(AsExpression node) {
1612 stopwatch.start(); 1624 stopwatch.start();
1613 T result = _baseVisitor.visitAsExpression(node); 1625 T result = _baseVisitor.visitAsExpression(node);
1614 stopwatch.stop(); 1626 stopwatch.stop();
1615 return result; 1627 return result;
1616 } 1628 }
1617 1629
1618 @override 1630 @override
1631 T visitAssertInitializer(AssertInitializer node) {
1632 stopwatch.start();
1633 T result = _baseVisitor.visitAssertInitializer(node);
1634 stopwatch.stop();
1635 return result;
1636 }
1637
1638 @override
1619 T visitAssertStatement(AssertStatement node) { 1639 T visitAssertStatement(AssertStatement node) {
1620 stopwatch.start(); 1640 stopwatch.start();
1621 T result = _baseVisitor.visitAssertStatement(node); 1641 T result = _baseVisitor.visitAssertStatement(node);
1622 stopwatch.stop(); 1642 stopwatch.stop();
1623 return result; 1643 return result;
1624 } 1644 }
1625 1645
1626 @override 1646 @override
1627 T visitAssignmentExpression(AssignmentExpression node) { 1647 T visitAssignmentExpression(AssignmentExpression node) {
1628 stopwatch.start(); 1648 stopwatch.start();
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
2468 @override 2488 @override
2469 R visitAnnotation(Annotation node) => visitNode(node); 2489 R visitAnnotation(Annotation node) => visitNode(node);
2470 2490
2471 @override 2491 @override
2472 R visitArgumentList(ArgumentList node) => visitNode(node); 2492 R visitArgumentList(ArgumentList node) => visitNode(node);
2473 2493
2474 @override 2494 @override
2475 R visitAsExpression(AsExpression node) => visitNode(node); 2495 R visitAsExpression(AsExpression node) => visitNode(node);
2476 2496
2477 @override 2497 @override
2498 R visitAssertInitializer(AssertInitializer node) => visitNode(node);
2499
2500 @override
2478 R visitAssertStatement(AssertStatement node) => visitNode(node); 2501 R visitAssertStatement(AssertStatement node) => visitNode(node);
2479 2502
2480 @override 2503 @override
2481 R visitAssignmentExpression(AssignmentExpression node) => visitNode(node); 2504 R visitAssignmentExpression(AssignmentExpression node) => visitNode(node);
2482 2505
2483 @override 2506 @override
2484 R visitAwaitExpression(AwaitExpression node) => visitNode(node); 2507 R visitAwaitExpression(AwaitExpression node) => visitNode(node);
2485 2508
2486 @override 2509 @override
2487 R visitBinaryExpression(BinaryExpression node) => visitNode(node); 2510 R visitBinaryExpression(BinaryExpression node) => visitNode(node);
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
2820 * Initialize a newly created visitor to help the [outerVisitor]. 2843 * Initialize a newly created visitor to help the [outerVisitor].
2821 */ 2844 */
2822 _BreadthFirstChildVisitor(this.outerVisitor); 2845 _BreadthFirstChildVisitor(this.outerVisitor);
2823 2846
2824 @override 2847 @override
2825 Object visitNode(AstNode node) { 2848 Object visitNode(AstNode node) {
2826 outerVisitor._queue.add(node); 2849 outerVisitor._queue.add(node);
2827 return null; 2850 return null;
2828 } 2851 }
2829 } 2852 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/dart/ast/ast.dart ('k') | pkg/analyzer/lib/src/dart/ast/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698