OLD | NEW |
1 /* Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 Use of this source code is governed by a BSD-style license that can be |
3 found in the LICENSE file. */ | 3 found in the LICENSE file. */ |
4 | 4 |
5 /* Test Dictionary productions | 5 /* Test Dictionary productions |
6 | 6 |
7 Run with --test to generate an AST and verify that all comments accurately | 7 Run with --test to generate an AST and verify that all comments accurately |
8 reflect the state of the Nodes. | 8 reflect the state of the Nodes. |
9 | 9 |
10 BUILD Type(Name) | 10 BUILD Type(Name) |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 */ | 77 */ |
78 dictionary MyDictRequired { | 78 dictionary MyDictRequired { |
79 required long setLong; | 79 required long setLong; |
80 }; | 80 }; |
81 | 81 |
82 /* ERROR Unexpected "{" after keyword "dictionary". */ | 82 /* ERROR Unexpected "{" after keyword "dictionary". */ |
83 dictionary { | 83 dictionary { |
84 DOMString? setString = null; | 84 DOMString? setString = null; |
85 }; | 85 }; |
86 | 86 |
87 /* TREE | 87 /* ERROR Unexpected keyword "optional" after ">". */ |
88 *Dictionary(MyDictionaryInvalidOptional) | |
89 * Key(mandatory) | |
90 * Type() | |
91 * PrimitiveType(DOMString) | |
92 * Error(Unexpected keyword "optional" after ">".) | |
93 */ | |
94 dictionary MyDictionaryInvalidOptional { | 88 dictionary MyDictionaryInvalidOptional { |
95 DOMString mandatory; | 89 DOMString mandatory; |
96 sequence<DOMString> optional; | 90 sequence<DOMString> optional; |
97 }; | 91 }; |
98 | 92 |
99 /* ERROR Unexpected identifier "NoColon" after identifier "ForParent". */ | 93 /* ERROR Unexpected identifier "NoColon" after identifier "ForParent". */ |
100 dictionary ForParent NoColon { | 94 dictionary ForParent NoColon { |
101 DOMString? setString = null; | 95 DOMString? setString = null; |
102 }; | 96 }; |
103 | 97 |
104 /* TREE | 98 /* TREE |
105 *Dictionary(MyDictNull) | 99 *Dictionary(MyDictNull) |
106 * Key(setString) | 100 * Key(setString) |
107 * Type() | 101 * Type() |
108 * PrimitiveType(DOMString) | 102 * PrimitiveType(DOMString) |
109 * Default(NULL) | 103 * Default(NULL) |
110 */ | 104 */ |
111 dictionary MyDictNull { | 105 dictionary MyDictNull { |
112 DOMString? setString = null; | 106 DOMString? setString = null; |
113 }; | 107 }; |
114 | 108 |
115 /* ERROR Unexpected keyword "attribute" after "{". */ | 109 /* ERROR Unexpected keyword "attribute" after "{". */ |
116 dictionary MyDictUnexpectedAttribute { | 110 dictionary MyDictUnexpectedAttribute { |
117 attribute DOMString foo = ""; | 111 attribute DOMString foo = ""; |
118 }; | 112 }; |
OLD | NEW |