Merge pull request #2891 from dneto0/hlsl-namespace
[platform/upstream/glslang.git] / Test / lineContinuation.vert
1 #version 300 es
2
3 // this file cont\
4 ains no errors other than the #error which are there to see if line numbering for errors is correct
5
6 #error e1
7
8 float f\
9 oo;  // same as 'float foo;'
10
11 #error e2
12
13 #define MAIN void main() \
14    {                     \
15 gl_Position = vec4(foo); \
16
17
18 #error e3
19
20 MAIN
21
22 vec4 foo2(vec4 a)
23 {                                
24   vec4 b = a;       \
25   return b;                   
26 }
27
28 // aoeuntheo unatehutna \ antaehnathe 
29 // anteonuth $ natohe " '
30 // anteonuth     natohe
31
32 #define FOO int /* \
33 */ goodDecl;
34
35 FOO
36
37 #define A int q1 = \ 1
38 #define B int q2 = \1
39 #define C int q3 = $ 1
40 #define D int q4 = @ 1
41
42 const highp int a1 = \ 4;  // ERROR
43 const highp int a2 = @ 3;  // ERROR
44 const highp int a3 = $4;   // ERROR
45 const highp int a4 = a2\;  // ERROR
46
47 A;
48 B;
49 C;
50 D;
51
52 # \
53
54 # \
55     error good continuation
56
57 #define AA1 a \ b
58 #define AA2 a \\ b
59 #define AA3 a \\\ b
60 #define AA4 a \\\\ b
61
62 // anoetuh nonaetu \\\\\\
63 still in comment
64
65 const int abdece = 10;
66 const int aoeuntaoehu = abd\
67 \
68 \
69 \
70 \
71 \
72 ece;
73
74 float funkyf = \
75 .\
76 1\
77 2\
78 3\
79 e\
80 +\
81 1\
82 7\
83 ;\
84 int funkyh\
85 =\
86 0\
87 x\
88 f\
89 4\
90 ;
91 int funkyo =\
92 0\
93 4\
94 2\
95 ;
96 int c = \
97 11;
98 int d = 1\
99 2;
100
101 #define FOOM(a,b) a + b
102
103 #if FO\
104 OM(2\
105 ,\
106 3)
107 int bar103 = 17;
108 #endif
109
110 // ERROR
111 #if FOOM(2,
112 3)
113 int bar104 = 19;
114 #endif
115
116 // ERROR
117 #if FOOM(
118 2,3)
119 int bar105 = 19;
120 #endif
121
122 int bar106 = FOOM(5,7);
123 int bar107 = FOOM  // okay
124     (
125     2
126     ,
127     3
128     )
129     ;
130
131 void foo203209409()
132 {
133     bar107 \
134 += 37;
135     bar107 *\
136 = 38;
137     bar107 /=\
138 39;
139     bar107 +\
140 41;
141 }
142
143 #define QUOTE "ab\
144 cd"
145
146 void foo230920394()
147 {
148     // syntax error
149     bar107 +\
150  = 42;
151 }