mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
allow (and ignore) args to #endif
This commit is contained in:
parent
352c417095
commit
bc488bb495
@ -1479,8 +1479,9 @@ skip_false_if_block(bool consider_elifs) {
|
|||||||
int first_col = get_col_number();
|
int first_col = get_col_number();
|
||||||
|
|
||||||
// Is this it?
|
// Is this it?
|
||||||
string command;
|
string command, args;
|
||||||
c = get_preprocessor_command(c, command);
|
c = get_preprocessor_command(c, command);
|
||||||
|
c = get_preprocessor_args(c, args);
|
||||||
if (command == "if" || command == "ifdef" || command == "ifndef") {
|
if (command == "if" || command == "ifdef" || command == "ifndef") {
|
||||||
// Hmm, a nested if block. Even more to skip.
|
// Hmm, a nested if block. Even more to skip.
|
||||||
level++;
|
level++;
|
||||||
@ -1494,12 +1495,11 @@ skip_false_if_block(bool consider_elifs) {
|
|||||||
if (level == 0 && consider_elifs) {
|
if (level == 0 && consider_elifs) {
|
||||||
// If we pass this test, we're in.
|
// If we pass this test, we're in.
|
||||||
_save_comments = true;
|
_save_comments = true;
|
||||||
string args;
|
|
||||||
c = get_preprocessor_args(c, args);
|
|
||||||
handle_if_directive(args, first_line, first_col, first_file);
|
handle_if_directive(args, first_line, first_col, first_file);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else if (command == "endif") {
|
} else if (command == "endif") {
|
||||||
|
// Skip any args.
|
||||||
if (level == 0) {
|
if (level == 0) {
|
||||||
// Here's the end!
|
// Here's the end!
|
||||||
_save_comments = true;
|
_save_comments = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user