@@ -98,7 +98,7 @@ class DelegatingAstVisitor<T> extends UnifyingAstVisitor<T> {
98
98
99
99
/// Initialize a newly created visitor to use each of the given delegate
100
100
/// visitors to visit the nodes of an AST structure.
101
- DelegatingAstVisitor (this .delegates);
101
+ const DelegatingAstVisitor (this .delegates);
102
102
103
103
@override
104
104
T visitNode (AstNode node) {
@@ -128,6 +128,9 @@ class DelegatingAstVisitor<T> extends UnifyingAstVisitor<T> {
128
128
///
129
129
/// Clients may extend this class.
130
130
class GeneralizingAstVisitor <R > implements AstVisitor <R > {
131
+ /// Initialize a newly created visitor.
132
+ const GeneralizingAstVisitor ();
133
+
131
134
@override
132
135
R visitAdjacentStrings (AdjacentStrings node) => visitStringLiteral (node);
133
136
@@ -606,6 +609,9 @@ class GeneralizingAstVisitor<R> implements AstVisitor<R> {
606
609
///
607
610
/// Clients may extend this class.
608
611
class RecursiveAstVisitor <R > implements AstVisitor <R > {
612
+ /// Initialize a newly created visitor.
613
+ const RecursiveAstVisitor ();
614
+
609
615
@override
610
616
R visitAdjacentStrings (AdjacentStrings node) {
611
617
node.visitChildren (this );
@@ -1341,6 +1347,9 @@ class RecursiveAstVisitor<R> implements AstVisitor<R> {
1341
1347
///
1342
1348
/// Clients may extend this class.
1343
1349
class SimpleAstVisitor <R > implements AstVisitor <R > {
1350
+ /// Initialize a newly created visitor.
1351
+ const SimpleAstVisitor ();
1352
+
1344
1353
@override
1345
1354
R visitAdjacentStrings (AdjacentStrings node) => null ;
1346
1355
@@ -1719,6 +1728,9 @@ class SimpleAstVisitor<R> implements AstVisitor<R> {
1719
1728
///
1720
1729
/// Clients may extend this class.
1721
1730
class ThrowingAstVisitor <R > implements AstVisitor <R > {
1731
+ /// Initialize a newly created visitor.
1732
+ const ThrowingAstVisitor ();
1733
+
1722
1734
@override
1723
1735
R visitAdjacentStrings (AdjacentStrings node) => _throw (node);
1724
1736
@@ -3097,6 +3109,9 @@ class TimedAstVisitor<T> implements AstVisitor<T> {
3097
3109
///
3098
3110
/// Clients may extend this class.
3099
3111
class UnifyingAstVisitor <R > implements AstVisitor <R > {
3112
+ /// Initialize a newly created visitor.
3113
+ const UnifyingAstVisitor ();
3114
+
3100
3115
@override
3101
3116
R visitAdjacentStrings (AdjacentStrings node) => visitNode (node);
3102
3117
0 commit comments