glslang/Test/baseResults/preprocessor.cpp_style___FILE__.vert.out
Lei Zhang 5011fbebc3 Extend the syntax of #line and __FILE__ to support filename strings.
According to the GLSL spec, the second parameter to #line should be
an integer source string number and __FILE__ will be substituted
with the integer source string number currently processed. This
patch extends the syntax of #line and __FILE__. Now #line accepts
as the second parameter a filename string quoted by double quotation
marks. And if such a #line is set, __FILE__ will be substituted with
the currently set filename string. The implementation is done via
introducing a new extension GL_GOOGLE_cpp_style_line_directive using
the extension framework.

The purpose is to support cpp-style #line directives, which is
required by #include.
2015-07-27 13:07:52 -04:00

27 lines
337 B
Plaintext

#extension GL_GOOGLE_cpp_style_line_directive : enable
0
#line 150 a.h
"a.h"
#line 24
"a.h"
#line 42
"a.h"
#line 30 b.cc
"b.cc"
#line 10 3
3
#line 48
3
#line 4
3
#line 55 100
100
#line 1000 c
"c"
#line 42 1
1
#line 42 this-is-a-quite-long-name-maybe-i-should-shorten-it
"this-is-a-quite-long-name-maybe-i-should-shorten-it"