projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
894503c
)
Insert semicolon at EOF if necessary.
author
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 14 Dec 2010 18:52:09 +0000
(18:52 +0000)
committer
Ian Lance Taylor
<ian@gcc.gnu.org>
Tue, 14 Dec 2010 18:52:09 +0000
(18:52 +0000)
From-SVN: r167809
gcc/go/gofrontend/lex.cc
patch
|
blob
|
history
diff --git
a/gcc/go/gofrontend/lex.cc
b/gcc/go/gofrontend/lex.cc
index bc2531e8bd33f7dbc3d4186b8aea6b46f7d4f55d..ad1a1fe4fc748da016ff36412810ef62beeddfcc 100644
(file)
--- a/
gcc/go/gofrontend/lex.cc
+++ b/
gcc/go/gofrontend/lex.cc
@@
-542,7
+542,13
@@
Lex::next_token()
while (true)
{
if (!this->require_line())
- return this->make_eof_token();
+ {
+ bool add_semi_at_eol = this->add_semi_at_eol_;
+ this->add_semi_at_eol_ = false;
+ if (add_semi_at_eol)
+ return this->make_operator(OPERATOR_SEMICOLON, 1);
+ return this->make_eof_token();
+ }
const char* p = this->linebuf_ + this->lineoff_;
const char* pend = this->linebuf_ + this->linesize_;