Fix some crashes in GN.
commit693c60569dce46d5b1d5e2befcce95f9c8f171da
authorbrettw <brettw@chromium.org>
Fri, 7 Aug 2015 19:55:17 +0000 (7 12:55 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 7 Aug 2015 19:55:51 +0000 (7 19:55 +0000)
tree16d2e4373485ad6a54d78e7794c5eca474666a90
parent8fbf16aa2f30917658ea8a0dad9403f612f11022
Fix some crashes in GN.

GN would read past the end of the file if the last line was a comment that didn't end in a newline.

It also would get confused if an end-of-file was reached after an assignment or a unary operator.

BUG=478169

Review URL: https://codereview.chromium.org/1275853006

Cr-Commit-Position: refs/heads/master@{#342417}
tools/gn/parser.cc
tools/gn/parser_unittest.cc
tools/gn/tokenizer.cc