count lines during scanning for triple quotes
This commit is contained in:
@ -261,6 +261,7 @@ void Input::file()
|
|||||||
if (ntriple % 2) {
|
if (ntriple % 2) {
|
||||||
line[m+1] = '\n';
|
line[m+1] = '\n';
|
||||||
m += 2;
|
m += 2;
|
||||||
|
++nline;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -651,7 +651,7 @@ void lammps_commands_string(void *handle, const char *str)
|
|||||||
// split buffer into lines, set line number, process continuation characters, and here docs
|
// split buffer into lines, set line number, process continuation characters, and here docs
|
||||||
|
|
||||||
while (cursor < buffer.size()) {
|
while (cursor < buffer.size()) {
|
||||||
++ nline;
|
++nline;
|
||||||
std::size_t start = cursor;
|
std::size_t start = cursor;
|
||||||
cursor = buffer.find('\n', start);
|
cursor = buffer.find('\n', start);
|
||||||
if (cursor != std::string::npos) {
|
if (cursor != std::string::npos) {
|
||||||
|
|||||||
Reference in New Issue
Block a user