| 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 |
| 88 *Dictionary(MyDictionaryInvalidOptional) |
| 89 * Key(mandatory) |
| 90 * Type() |
| 91 * PrimitiveType(DOMString) |
| 92 * Error(Unexpected keyword "optional" after ">".) |
| 93 */ |
| 94 dictionary MyDictionaryInvalidOptional { |
| 95 DOMString mandatory; |
| 96 sequence<DOMString> optional; |
| 97 }; |
| 87 | 98 |
| 88 /* ERROR Unexpected identifier "NoColon" after identifier "ForParent". */ | 99 /* ERROR Unexpected identifier "NoColon" after identifier "ForParent". */ |
| 89 dictionary ForParent NoColon { | 100 dictionary ForParent NoColon { |
| 90 DOMString? setString = null; | 101 DOMString? setString = null; |
| 91 }; | 102 }; |
| 92 | 103 |
| 93 /* TREE | 104 /* TREE |
| 94 *Dictionary(MyDictNull) | 105 *Dictionary(MyDictNull) |
| 95 * Key(setString) | 106 * Key(setString) |
| 96 * Type() | 107 * Type() |
| 97 * PrimitiveType(DOMString) | 108 * PrimitiveType(DOMString) |
| 98 * Default(NULL) | 109 * Default(NULL) |
| 99 */ | 110 */ |
| 100 dictionary MyDictNull { | 111 dictionary MyDictNull { |
| 101 DOMString? setString = null; | 112 DOMString? setString = null; |
| 102 }; | 113 }; |
| 103 | 114 |
| 104 /* ERROR Unexpected keyword "attribute" after "{". */ | 115 /* ERROR Unexpected keyword "attribute" after "{". */ |
| 105 dictionary MyDictUnexpectedAttribute { | 116 dictionary MyDictUnexpectedAttribute { |
| 106 attribute DOMString foo = ""; | 117 attribute DOMString foo = ""; |
| 107 }; | 118 }; |
| OLD | NEW |