Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Side by Side Diff: tools/idl_parser/test_parser/exception.idl

Issue 13498002: Add WebIDL compliant parser plus tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up IDLNode, make members private Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 Exception 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 *Exception(MyExc)
35 */
36 exception MyExc { };
37
38 /* TREE
39 *Exception(MyExcInherit)
40 * Inherit(Foo)
41 */
42 exception MyExcInherit : Foo {};
43
44 /* ERROR Unexpected keyword "exception" after keyword "partial". */
45 partial exception MyExcPartial { };
46
47 /* ERROR Unexpected "=" after identifier "ErrorSetLong". */
48 /* TREE
49 *Exception(MyExcBig)
50 * ExceptionField(MyString)
51 * Type()
52 * PrimitiveType(DOMString)
53 * Error(Unexpected "=" after identifier "ErrorSetLong".)
54 * ExceptionField(MyLong)
55 * Type()
56 * PrimitiveType(long)
57 */
58 exception MyExcBig {
59 DOMString MyString;
60 unsigned long long ErrorSetLong = 123;
61 long MyLong;
62 };
63
64
65 /* ERROR Unexpected "{" after keyword "exception". */
66 exception {
67 DOMString? setString = null;
68 };
69
70
71 /* ERROR Unexpected identifier "NoColon" after identifier "ForParent". */
72 exception ForParent NoColon {
73 DOMString? setString = null;
74 };
75
76 /* TREE
77 *Exception(MyExcConst)
78 * Const(setString)
79 * PrimitiveType(DOMString)
80 * Value(NULL)
81 */
82 exception MyExcConst {
83 const DOMString? setString = null;
84 };
85
86
87
88
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698