From 1d7e03e48e87328ce0081021dde133921b78b406 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 20 Jul 2010 14:13:32 -0700 Subject: glcpp: Fix support for nested #ifdef and nested #ifndef Previously, if the outer #ifdef/#ifndef evaluated to false, the inner directive would not be parsed correctly, (the identifier as the subject of the #ifdef/#ifndef would inadvertently be skipped along with the other content correctly being skipped). We fix this by setting the lexing_if state in each case here. We also add a new test to the test suite to ensure that this case is tested. --- .../glcpp/tests/067-nested-ifdef-ifndef.c.expected | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected (limited to 'src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected') diff --git a/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected b/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected new file mode 100644 index 00000000000..3340daaa1f9 --- /dev/null +++ b/src/glsl/glcpp/tests/067-nested-ifdef-ifndef.c.expected @@ -0,0 +1,41 @@ + + + + + + + + + + + +success + + + + + + + +success + + + + + + + + + +success + + + + + + + + + +success + -- cgit v1.2.3