Preprocessor fixes:

- Correctly handle non-directive lines starting with "#"
 - Correctly ignore unrecognized #pragma
 - Partial fix for new lines in the middle of macro invocation



git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24266 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-12-02 15:56:38 +00:00
parent 3591813a8b
commit 98434bed00
7 changed files with 192 additions and 128 deletions

View file

@ -75,5 +75,30 @@ float foo()
#define BIGARGS3(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu
#define BIGARGS4(aonthanotehu, bonthanotehu, conthanotehu, donthanotehu, eonthanotehu, fonthanotehu, gonthanotehu, honthanotehu, ionthanotehu, jonthanotehu, konthanotehu) jonthanotehu
#define foobar(a, b) a + b
#if foobar(1.1, 2.2)
#error good macro
#else
#error bad macro
#endif
#if foobar(1
;
#
#
#endif
#if foobar(1,
;
#
#
#endif
float c = foobar(1.1, 2.2
);
#if foobar(1.1, 2.2
)
#if foobar(1.1, 2.2
#if 0
// ERROR, EOF