mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 16:20:11 -04:00
cppparser: In preprocess mode, add newline when switching files
This commit is contained in:
parent
329fa728a7
commit
e1870047c6
@ -404,7 +404,13 @@ preprocess_file(const Filename &filename) {
|
|||||||
}
|
}
|
||||||
next_space = (token._token != '(' && token._token != '~');
|
next_space = (token._token != '(' && token._token != '~');
|
||||||
token.output_code(std::cout);
|
token.output_code(std::cout);
|
||||||
token = get_next_token();
|
|
||||||
|
CPPToken next_token = get_next_token();
|
||||||
|
if (next_token._lloc.file != token._lloc.file) {
|
||||||
|
// Switched to a new file, reset the line number.
|
||||||
|
line_number = 0;
|
||||||
|
}
|
||||||
|
token = next_token;
|
||||||
}
|
}
|
||||||
std::cout << "\n";
|
std::cout << "\n";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user