From 27d79a508aa17badfb3b997cf23ab6347c60546c Mon Sep 17 00:00:00 2001 From: tfarina Date: Thu, 26 Feb 2015 17:05:52 -0800 Subject: [PATCH] gn: It is simpler to just call Consume() method. Like we do everywhere else. $ gn gen out-gn $ ninja -C out-gn gn $ out-gn/gn gen out-gn BUG=None TEST=see above R=scottmg@chromium.org Review URL: https://codereview.chromium.org/958713002 Cr-Commit-Position: refs/heads/master@{#318365} --- tools/gn/parser.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gn/parser.cc b/tools/gn/parser.cc index 309bc5332026..d99b574c073c 100644 --- a/tools/gn/parser.cc +++ b/tools/gn/parser.cc @@ -174,7 +174,7 @@ Token Parser::Consume(Token::Type* types, for (size_t i = 0; i < num_types; ++i) { if (cur_token().type() == types[i]) - return tokens_[cur_++]; + return Consume(); } *err_ = Err(cur_token(), error_message); return Token(Location(), Token::INVALID, base::StringPiece()); -- 2.11.4.GIT