John Kessenich
d2762564dc
Preprocessor: Prevent (and give an error on) expression division by 0.
2015-07-20 12:29:41 -06:00
John Kessenich
50d542e6b9
Implement ES-3.0-specific error semantics for redefining predefined macros.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@29353 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-01-07 18:47:57 +00:00
John Kessenich
2b20dcb64d
Fix public bug 1277: #line L sets the next line to L+1 or just L, based on the version of the language.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@29277 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-12-20 07:03:18 +00:00
John Kessenich
7fc3669195
Preprocessor: Add short-circuit logic so ES errors are not given on undefined variables that are short circuited in && and || preprocessing expressions.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24390 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-12-06 18:19:22 +00:00
John Kessenich
98434bed00
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
2013-12-02 15:56:38 +00:00
John Kessenich
e1dba1b59f
Fix a preprocessor memory leak by cleaning up some preprocessor memory management.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24125 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-19 20:52:56 +00:00
John Kessenich
4d6570a1b3
Fix several issues in the preprocessor:
...
- macro expansion of hexidecimal numbers
- give errors instead of warnings/silence on extra tokens after #endif, #else, etc.
- give errors on reserved macro name use, reuse of argument, and redefinition with different whitespace presence
- detect and give error for all cases of #elif and #else after #else
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23982 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-10 23:07:36 +00:00
John Kessenich
8d8f4cc408
Minor preprocessor fix for error message line/string numbers coming from source line, not macro line.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23576 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-10-18 03:09:37 +00:00
John Kessenich
464f6d9ff1
Add some CPP tests.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20457 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-02-06 00:14:16 +00:00