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 Exception productions
7 Run with --test to generate an AST and verify that all comments accurately
8 reflect the state of the Nodes.
11 This comment signals that a node of type <Type> is created with the
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.
19 This comment signals that a property has been set on the Node such that
28 This comment signals that a tree of nodes matching the BUILD comment
29 symatics should exist. This is an exact match.
39 *Exception(MyExcInherit)
42 exception MyExcInherit
: Foo
{};
44 /* ERROR Unexpected keyword "exception" after keyword "partial". */
45 partial exception MyExcPartial
{ };
49 * ExceptionField(MyString)
51 * PrimitiveType(DOMString)
52 * Error(Unexpected "=" after identifier "ErrorSetLong".)
53 * ExceptionField(MyLong)
59 unsigned long long ErrorSetLong
= 123;
64 /* ERROR Unexpected "{" after keyword "exception". */
66 DOMString? setString
= null
;
70 /* ERROR Unexpected identifier "NoColon" after identifier "ForParent". */
71 exception ForParent NoColon
{
72 DOMString? setString
= null
;
76 *Exception(MyExcConst)
78 * PrimitiveType(DOMString)
81 exception MyExcConst
{
82 const DOMString? setString
= null
;