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

Unified Diff: lib/src/parser.dart

Issue 1375713005: Fix some strong mode warnings in the parser. (Closed) Base URL: git@github.com:dart-lang/yaml@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « CHANGELOG.md ('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 136247b74bd13e6c9c94cdabfab80c91efab632a..b44043a1e62f3adf2afd46d9e6c1dc11c8504672 100644
--- a/lib/src/parser.dart
+++ b/lib/src/parser.dart
@@ -260,24 +260,24 @@ class Parser {
var anchor;
var tagToken;
var span = token.span.start.pointSpan();
- parseAnchor() {
+ parseAnchor(token) {
anchor = token.name;
span = span.expand(token.span);
- token = _scanner.advance();
+ return _scanner.advance();
}
- parseTag() {
+ parseTag(token) {
tagToken = token;
span = span.expand(token.span);
- token = _scanner.advance();
+ return _scanner.advance();
}
if (token is AnchorToken) {
- parseAnchor();
- if (token is TagToken) parseTag();
+ token = parseAnchor(token);
+ if (token is TagToken) token = parseTag(token);
} else if (token is TagToken) {
- parseTag();
- if (token is AnchorToken) parseAnchor();
+ token = parseTag(token);
+ if (token is AnchorToken) token = parseAnchor(token);
}
var tag;
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698