Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / tools / idl_parser / test_parser / struct_ppapi.idl
blob59bc7eb8648698d261045711239edd4c76a4ddc7
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. */
5 /* Test Struct productions
7 Run with --test to generate an AST and verify that all comments accurately
8 reflect the state of the Nodes.
10 BUILD Type(Name)
11 This comment signals that a node of type <Type> is created with the
12 name <Name>.
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.
18 PROP Key=Value
19 This comment signals that a property has been set on the Node such that
20 <Key> = <Value>.
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.
32 /* TREE
33 *Struct(MyStruct)
34 * Member(x)
35 * Type()
36 * PrimitiveType(uint32_t)
37 * Member(y)
38 * Type()
39 * PrimitiveType(uint64_t)
40 * Member(string)
41 * ExtAttributes()
42 * ExtAttribute(fake_attribute)
43 * Type()
44 * PrimitiveType(str_t)
45 * Member(z)
46 * Type()
47 * Typeref(Promise)
48 * ExtAttributes()
49 * ExtAttribute(union)
51 [union] struct MyStruct {
52 uint32_t x;
53 uint64_t y;
54 [fake_attribute] str_t string;
55 Promise z;