Commit 7ed66e66 by Ian Lance Taylor

Insert semicolon at EOF if necessary.

From-SVN: r167809
parent 894503cb
......@@ -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_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment