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

Unified Diff: lib/src/parser.dart

Issue 1843173003: Fix strong mode warnings and errors. (Closed) Base URL: git@github.com:dart-lang/glob@master
Patch Set: Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/list_tree.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/parser.dart
diff --git a/lib/src/parser.dart b/lib/src/parser.dart
index 14cdc1940c591de8570cf7cb8d9ffefb26a289f1..d3c7e1ddd9658a99e1139831fe79ea23854c05a3 100644
--- a/lib/src/parser.dart
+++ b/lib/src/parser.dart
@@ -33,7 +33,7 @@ class Parser {
///
/// If [inOptions] is true, this is parsing within an [OptionsNode].
SequenceNode _parseSequence({bool inOptions: false}) {
- var nodes = [];
+ var nodes = <AstNode>[];
if (_scanner.isDone) {
_scanner.error('expected a glob.', position: 0, length: 0);
@@ -99,7 +99,7 @@ class Parser {
position: _scanner.position - 1);
}
- var ranges = [];
+ var ranges = <Range>[];
while (!_scanner.scan(']')) {
var start = _scanner.position;
// Allow a backslash to escape a character.
@@ -140,7 +140,7 @@ class Parser {
if (!_scanner.scan('{')) return null;
if (_scanner.matches('}')) _scanner.error('unexpected "}".');
- var options = [];
+ var options = <SequenceNode>[];
do {
options.add(_parseSequence(inOptions: true));
} while (_scanner.scan(','));
« no previous file with comments | « lib/src/list_tree.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698