| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 */ | 46 */ |
| 47 partial dictionary MyDictPartial { }; | 47 partial dictionary MyDictPartial { }; |
| 48 | 48 |
| 49 /* ERROR Unexpected ":" after identifier "MyDictInherit". */ | 49 /* ERROR Unexpected ":" after identifier "MyDictInherit". */ |
| 50 partial dictionary MyDictInherit : Foo {}; | 50 partial dictionary MyDictInherit : Foo {}; |
| 51 | 51 |
| 52 /* TREE | 52 /* TREE |
| 53 *Dictionary(MyDictBig) | 53 *Dictionary(MyDictBig) |
| 54 * Key(setString) | 54 * Key(setString) |
| 55 * Type() | 55 * Type() |
| 56 * PrimitiveType(DOMString) | 56 * StringType(DOMString) |
| 57 * Default(Foo) | 57 * Default(Foo) |
| 58 * Key(setLong) | 58 * Key(setLong) |
| 59 * Type() | 59 * Type() |
| 60 * PrimitiveType(unsigned long long) | 60 * PrimitiveType(unsigned long long) |
| 61 * Default(123) | 61 * Default(123) |
| 62 * Key(unsetLong) | 62 * Key(unsetLong) |
| 63 * Type() | 63 * Type() |
| 64 * PrimitiveType(long) | 64 * PrimitiveType(long) |
| 65 */ | 65 */ |
| 66 dictionary MyDictBig { | 66 dictionary MyDictBig { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 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 /* TREE |
| 88 *Dictionary(MyDictionaryInvalidOptional) | 88 *Dictionary(MyDictionaryInvalidOptional) |
| 89 * Key(mandatory) | 89 * Key(mandatory) |
| 90 * Type() | 90 * Type() |
| 91 * PrimitiveType(DOMString) | 91 * StringType(DOMString) |
| 92 * Error(Unexpected keyword "optional" after ">".) | 92 * Error(Unexpected keyword "optional" after ">".) |
| 93 */ | 93 */ |
| 94 dictionary MyDictionaryInvalidOptional { | 94 dictionary MyDictionaryInvalidOptional { |
| 95 DOMString mandatory; | 95 DOMString mandatory; |
| 96 sequence<DOMString> optional; | 96 sequence<DOMString> optional; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 /* ERROR Unexpected identifier "NoColon" after identifier "ForParent". */ | 99 /* ERROR Unexpected identifier "NoColon" after identifier "ForParent". */ |
| 100 dictionary ForParent NoColon { | 100 dictionary ForParent NoColon { |
| 101 DOMString? setString = null; | 101 DOMString? setString = null; |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 /* TREE | 104 /* TREE |
| 105 *Dictionary(MyDictNull) | 105 *Dictionary(MyDictNull) |
| 106 * Key(setString) | 106 * Key(setString) |
| 107 * Type() | 107 * Type() |
| 108 * PrimitiveType(DOMString) | 108 * StringType(DOMString) |
| 109 * Default(NULL) | 109 * Default(NULL) |
| 110 */ | 110 */ |
| 111 dictionary MyDictNull { | 111 dictionary MyDictNull { |
| 112 DOMString? setString = null; | 112 DOMString? setString = null; |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 /* ERROR Unexpected keyword "attribute" after "{". */ | 115 /* ERROR Unexpected keyword "attribute" after "{". */ |
| 116 dictionary MyDictUnexpectedAttribute { | 116 dictionary MyDictUnexpectedAttribute { |
| 117 attribute DOMString foo = ""; | 117 attribute DOMString foo = ""; |
| 118 }; | 118 }; |
| OLD | NEW |