blob: bc5a2b13bf2677767e607417d0e5ac6341e8f0f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
//TEST:SIMPLE:
// test that we can parse all the expected kinds of declarations
// global-scope `using` is another test
/* Note(tfoley): disabled during syntax transition
// pipeline
pipeline P
{
}
*/
// empty declaration
;
// struct type
struct Pair
{
int head;
float tail;
// Note(tfoley): semicolon is expected/required
// here for compatibility with HLSL (C-style
// declarators).
//
// TODO: this could be removed if we treat
// HLSL as a "compatibility mode"
};
// function at global scope
float tail(Pair p) { return p.tail; }
/* Note(tfoley): disabled during syntax transition
// module
module M
{
// component declarations
// using declarations
}
// a module can "inherit" from a pipeline
module M2
targets P
{
}
// shader
shader S
{
// component declarations
// using declarations
}
*/
|