Skip to content

Commit 691fa96

Browse files
authored
Make two regular expressions static (#3194)
1 parent ce5bd27 commit 691fa96

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/src/model/documentation_comment.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -471,15 +471,15 @@ mixin DocumentationComment
471471
});
472472
}
473473

474-
/// Matches all animation directives (even some invalid ones). This is so
475-
/// we can give good error messages if the directive is malformed, instead of
474+
/// Matches all animation directives (even some invalid ones). This is so we
475+
/// can give good error messages if the directive is malformed, instead of
476476
/// just silently emitting it as-is.
477-
final _basicAnimationPattern = RegExp(r'''{@animation\s+([^}]+)}''');
477+
static final _basicAnimationPattern = RegExp(r'''{@animation\s+([^}]+)}''');
478478

479-
/// Matches valid javascript identifiers.
480-
final _validIdPattern = RegExp(r'^[a-zA-Z_]\w*$');
479+
/// Matches valid JavaScript identifiers.
480+
static final _validIdPattern = RegExp(r'^[a-zA-Z_]\w*$');
481481

482-
/// An argument parser used in [_injectAnimations] to parse a `{@animation}`
482+
/// An argument parser used in [_injectAnimations] to parse an `{@animation}`
483483
/// directive.
484484
static final _animationArgParser = ArgParser()..addOption('id');
485485

0 commit comments

Comments
 (0)