Mercurial > jwe > octave
comparison libinterp/parse-tree/oct-parse.yy @ 28153:a04cb1364af4
maint: merge stable to default.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 09 Mar 2020 10:25:21 -0400 |
parents | 27c0b26e5a9f 648202bebcb0 |
children | 38a9f6444eb0 |
comparison
equal
deleted
inserted
replaced
28151:27c0b26e5a9f | 28153:a04cb1364af4 |
---|---|
4659 | 4659 |
4660 int token = octave_lex (&lval, m_lexer.m_scanner); | 4660 int token = octave_lex (&lval, m_lexer.m_scanner); |
4661 | 4661 |
4662 if (token < 0) | 4662 if (token < 0) |
4663 { | 4663 { |
4664 status = -1; | 4664 // TOKEN == -2 means that the lexer recognized a comment |
4665 // and we should be at the end of the buffer but not the | |
4666 // end of the file so we should return 0 to indicate | |
4667 // "complete input" instead of -1 to request more input. | |
4668 | |
4669 status = (token == -2 ? 0 : -1); | |
4665 | 4670 |
4666 if (! eof && m_lexer.at_end_of_buffer ()) | 4671 if (! eof && m_lexer.at_end_of_buffer ()) |
4667 return status; | 4672 return status; |
4668 | 4673 |
4669 break; | 4674 break; |