| Index: tools/idl_parser/test_parser/typedef.idl
|
| diff --git a/tools/idl_parser/test_parser/typedef.idl b/tools/idl_parser/test_parser/typedef.idl
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..ba95db7ccfe68bc4ee3a9ca7cf566a5b3421ea48
|
| --- /dev/null
|
| +++ b/tools/idl_parser/test_parser/typedef.idl
|
| @@ -0,0 +1,190 @@
|
| +/* Copyright (c) 2013 The Chromium Authors. All rights reserved.
|
| + Use of this source code is governed by a BSD-style license that can be
|
| + found in the LICENSE file. */
|
| +
|
| +/* Test Typedef productions
|
| +
|
| +Run with --test to generate an AST and verify that all comments accurately
|
| +reflect the state of the Nodes.
|
| +
|
| +BUILD Type(Name)
|
| +This comment signals that a node of type <Type> is created with the
|
| +name <Name>.
|
| +
|
| +ERROR Error String
|
| +This comment signals that a error of <Error String> is generated. The error
|
| +is not assigned to a node, but are expected in order.
|
| +
|
| +PROP Key=Value
|
| +This comment signals that a property has been set on the Node such that
|
| +<Key> = <Value>.
|
| +
|
| +TREE
|
| +Type(Name)
|
| + Type(Name)
|
| + Type(Name)
|
| + Type(Name)
|
| + ...
|
| +This comment signals that a tree of nodes matching the BUILD comment
|
| +symatics should exist. This is an exact match.
|
| +*/
|
| +
|
| +
|
| +/* TREE
|
| + *Typedef(MyLong)
|
| + * Type()
|
| + * PrimitiveType(long)
|
| + */
|
| +typedef long MyLong;
|
| +
|
| +/* TREE
|
| + *Typedef(MyLong)
|
| + * ExtAttributes()
|
| + * ExtAttribute(foo)
|
| + * Type()
|
| + * PrimitiveType(long)
|
| + */
|
| +typedef [foo] long MyLong;
|
| +
|
| +/* TREE
|
| + *Typedef(MyLongArray)
|
| + * Type()
|
| + * PrimitiveType(long)
|
| + * Array()
|
| + */
|
| +typedef long[] MyLongArray;
|
| +
|
| +/* TREE
|
| + *Typedef(MyLongSizedArray)
|
| + * Type()
|
| + * PrimitiveType(long)
|
| + * Array(4)
|
| + */
|
| +typedef long[4] MyLongSizedArray;
|
| +
|
| +/* TREE
|
| + *Typedef(MyLongSizedArrayArray)
|
| + * Type()
|
| + * PrimitiveType(long)
|
| + * Array(4)
|
| + * Array(5)
|
| + */
|
| +typedef long[4][5] MyLongSizedArrayArray;
|
| +
|
| +/* TREE
|
| + *Typedef(MyLongArraySizedArray)
|
| + * Type()
|
| + * PrimitiveType(long)
|
| + * Array()
|
| + * Array(5)
|
| + */
|
| +typedef long[][5] MyLongArraySizedArray;
|
| +
|
| +/* TREE
|
| + *Typedef(MyTypeFive)
|
| + * Type()
|
| + * Typeref(MyType)
|
| + * Array(5)
|
| + */
|
| +typedef MyType[5] MyTypeFive;
|
| +
|
| +/* TREE
|
| + *Typedef(MyTypeUnsizedFive)
|
| + * Type()
|
| + * Typeref(MyType)
|
| + * Array()
|
| + * Array(5)
|
| + */
|
| +typedef MyType[][5] MyTypeUnsizedFive;
|
| +
|
| +/* TREE
|
| + *Typedef(MyLongLong)
|
| + * Type()
|
| + * PrimitiveType(long long)
|
| + */
|
| +typedef long long MyLongLong;
|
| +
|
| +/* TREE
|
| + *Typedef(MyULong)
|
| + * Type()
|
| + * PrimitiveType(unsigned long)
|
| + */
|
| +typedef unsigned long MyULong;
|
| +
|
| +/* TREE
|
| + *Typedef(MyULongLong)
|
| + * Type()
|
| + * PrimitiveType(unsigned long long)
|
| + */
|
| +typedef unsigned long long MyULongLong;
|
| +
|
| +/* TREE
|
| + *Typedef(MyString)
|
| + * Type()
|
| + * PrimitiveType(DOMString)
|
| + */
|
| +typedef DOMString MyString;
|
| +
|
| +/* TREE
|
| + *Typedef(MyObject)
|
| + * Type()
|
| + * PrimitiveType(object)
|
| + */
|
| +typedef object MyObject;
|
| +
|
| +/* TREE
|
| + *Typedef(MyDate)
|
| + * Type()
|
| + * PrimitiveType(Date)
|
| + */
|
| +typedef Date MyDate;
|
| +
|
| +/* TREE
|
| + *Typedef(MyFloat)
|
| + * Type()
|
| + * PrimitiveType(float)
|
| + */
|
| +typedef float MyFloat;
|
| +
|
| +/* TREE
|
| + *Typedef(MyUFloat)
|
| + * Type()
|
| + * PrimitiveType(float)
|
| + */
|
| +typedef unrestricted float MyUFloat;
|
| +
|
| +/* TREE
|
| + *Typedef(MyDouble)
|
| + * Type()
|
| + * PrimitiveType(double)
|
| + */
|
| +typedef double MyDouble;
|
| +
|
| +/* TREE
|
| + *Typedef(MyUDouble)
|
| + * Type()
|
| + * PrimitiveType(double)
|
| + */
|
| +typedef unrestricted double MyUDouble;
|
| +
|
| +/* TREE
|
| + *Typedef(MyBool)
|
| + * Type()
|
| + * PrimitiveType(boolean)
|
| + */
|
| +typedef boolean MyBool;
|
| +
|
| +/* TREE
|
| + *Typedef(MyByte)
|
| + * Type()
|
| + * PrimitiveType(byte)
|
| + */
|
| +typedef byte MyByte;
|
| +
|
| +/* TREE
|
| + *Typedef(MyOctet)
|
| + * Type()
|
| + * PrimitiveType(octet)
|
| + */
|
| +typedef octet MyOctet;
|
| +
|
|
|