- add sources.
[platform/framework/web/crosswalk.git] / src / tools / idl_parser / test_parser / typedef_web.idl
1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved.
2    Use of this source code is governed by a BSD-style license that can be
3   found in the LICENSE file. */
4
5 /* Test Typedef productions
6
7 Run with --test to generate an AST and verify that all comments accurately
8 reflect the state of the Nodes.
9
10 BUILD Type(Name)
11 This comment signals that a node of type <Type> is created with the
12 name <Name>.
13
14 ERROR Error String
15 This comment signals that a error of <Error String> is generated.  The error
16 is not assigned to a node, but are expected in order.
17
18 PROP Key=Value
19 This comment signals that a property has been set on the Node such that
20 <Key> = <Value>.
21
22 TREE
23 Type(Name)
24   Type(Name)
25   Type(Name)
26     Type(Name)
27     ...
28 This comment signals that a tree of nodes matching the BUILD comment
29 symatics should exist.  This is an exact match.
30 */
31
32
33 /* TREE
34  *Typedef(MyLong)
35  *  Type()
36  *    PrimitiveType(long)
37  */
38 typedef long MyLong;
39
40 /* TREE
41  *Typedef(MyLong)
42  *  ExtAttributes()
43  *    ExtAttribute(foo)
44  *  Type()
45  *    PrimitiveType(long)
46  */
47 typedef [foo] long MyLong;
48
49 /* TREE
50  *Typedef(MyLongArray)
51  *  Type()
52  *    PrimitiveType(long)
53  *    Array()
54  */
55 typedef long[] MyLongArray;
56
57 /* TREE
58  *Typedef(MyLongSizedArray)
59  *  Type()
60  *    PrimitiveType(long)
61  *    Array(4)
62  */
63 typedef long[4] MyLongSizedArray;
64
65 /* TREE
66  *Typedef(MyLongSizedArrayArray)
67  *  Type()
68  *    PrimitiveType(long)
69  *    Array(4)
70  *      Array(5)
71  */
72 typedef long[4][5] MyLongSizedArrayArray;
73
74 /* TREE
75  *Typedef(MyLongArraySizedArray)
76  *  Type()
77  *    PrimitiveType(long)
78  *    Array()
79  *      Array(5)
80  */
81 typedef long[][5] MyLongArraySizedArray;
82
83 /* TREE
84  *Typedef(MyTypeFive)
85  *  Type()
86  *    Typeref(MyType)
87  *    Array(5)
88  */
89 typedef MyType[5] MyTypeFive;
90
91 /* TREE
92  *Typedef(MyTypeUnsizedFive)
93  *  Type()
94  *    Typeref(MyType)
95  *    Array()
96  *      Array(5)
97  */
98 typedef MyType[][5] MyTypeUnsizedFive;
99
100 /* TREE
101  *Typedef(MyLongLong)
102  *  Type()
103  *    PrimitiveType(long long)
104  */
105 typedef long long MyLongLong;
106
107 /* TREE
108  *Typedef(MyULong)
109  *  Type()
110  *    PrimitiveType(unsigned long)
111  */
112 typedef unsigned long MyULong;
113
114 /* TREE
115  *Typedef(MyULongLong)
116  *  Type()
117  *    PrimitiveType(unsigned long long)
118  */
119 typedef unsigned long long MyULongLong;
120
121 /* TREE
122  *Typedef(MyString)
123  *  Type()
124  *    PrimitiveType(DOMString)
125  */
126 typedef DOMString MyString;
127
128 /* TREE
129  *Typedef(MyObject)
130  *  Type()
131  *    PrimitiveType(object)
132  */
133 typedef object MyObject;
134
135 /* TREE
136  *Typedef(MyDate)
137  *  Type()
138  *    PrimitiveType(Date)
139  */
140 typedef Date MyDate;
141
142 /* TREE
143  *Typedef(MyFloat)
144  *  Type()
145  *    PrimitiveType(float)
146  */
147 typedef float MyFloat;
148
149 /* TREE
150  *Typedef(MyUFloat)
151  *  Type()
152  *    PrimitiveType(float)
153  */
154 typedef unrestricted float MyUFloat;
155
156 /* TREE
157  *Typedef(MyDouble)
158  *  Type()
159  *    PrimitiveType(double)
160  */
161 typedef double MyDouble;
162
163 /* TREE
164  *Typedef(MyUDouble)
165  *  Type()
166  *    PrimitiveType(double)
167  */
168 typedef unrestricted double MyUDouble;
169
170 /* TREE
171  *Typedef(MyBool)
172  *  Type()
173  *    PrimitiveType(boolean)
174  */
175 typedef boolean MyBool;
176
177 /* TREE
178  *Typedef(MyByte)
179  *  Type()
180  *    PrimitiveType(byte)
181  */
182 typedef byte MyByte;
183
184 /* TREE
185  *Typedef(MyOctet)
186  *  Type()
187  *    PrimitiveType(octet)
188  */
189 typedef octet MyOctet;
190