mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
allow a semicolon within a comment
This commit is contained in:
parent
3ee73860c4
commit
4974c1615d
@ -188,7 +188,14 @@ int TxaFile::
|
|||||||
get_line_or_semicolon(istream &in, string &line) {
|
get_line_or_semicolon(istream &in, string &line) {
|
||||||
line = string();
|
line = string();
|
||||||
int ch = in.get();
|
int ch = in.get();
|
||||||
while (ch != EOF && ch != '\n' && ch != ';') {
|
char semicolon = ';';
|
||||||
|
|
||||||
|
while (ch != EOF && ch != '\n' && ch != semicolon) {
|
||||||
|
if (ch == '#') {
|
||||||
|
// We don't consider a semicolon within a comment to be a line
|
||||||
|
// break.
|
||||||
|
semicolon = EOF;
|
||||||
|
}
|
||||||
line += ch;
|
line += ch;
|
||||||
ch = in.get();
|
ch = in.get();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user