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

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

Issue 329853005: IDL parser: align with current Web IDL specification (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: rebased Created 6 years, 6 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
« no previous file with comments | « tools/idl_parser/test_lexer/keywords.in ('k') | tools/idl_parser/test_parser/interface_web.idl » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 Enum productions 5 /* Test Enum 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 */ 60 */
61 enum MealType2 { 61 enum MealType2 {
62 /* BUILD EnumItem(rice) */ 62 /* BUILD EnumItem(rice) */
63 "rice", 63 "rice",
64 /* BUILD EnumItem(noodles) */ 64 /* BUILD EnumItem(noodles) */
65 "noodles", 65 "noodles",
66 /* BUILD EnumItem(other) */ 66 /* BUILD EnumItem(other) */
67 "other" 67 "other"
68 }; 68 };
69 69
70 /* TREE
71 *Enum(TrailingComma)
72 * EnumItem(rice)
73 * EnumItem(noodles)
74 * EnumItem(other)
75 */
76 enum TrailingComma {
77 "rice",
78 "noodles",
79 "other",
80 };
81
70 /* BUILD Error(Unexpected string "noodles" after string "rice".) */ 82 /* BUILD Error(Unexpected string "noodles" after string "rice".) */
71 /* ERROR Unexpected string "noodles" after string "rice". */ 83 /* ERROR Unexpected string "noodles" after string "rice". */
72 enum MissingComma { 84 enum MissingComma {
73 "rice" 85 "rice"
74 "noodles", 86 "noodles",
75 "other" 87 "other"
76 }; 88 };
77 89
78 /* BUILD Error(Trailing comma in block.) */
79 /* ERROR Trailing comma in block. */
80 enum TrailingComma {
81 "rice",
82 "noodles",
83 "other",
84 };
85
86 /* BUILD Error(Unexpected "," after ",".) */ 90 /* BUILD Error(Unexpected "," after ",".) */
87 /* ERROR Unexpected "," after ",". */ 91 /* ERROR Unexpected "," after ",". */
88 enum ExtraComma { 92 enum ExtraComma {
89 "rice", 93 "rice",
90 "noodles", 94 "noodles",
91 ,"other", 95 ,"other",
92 }; 96 };
93 97
94 /* BUILD Error(Unexpected keyword "interface" after "{".) */ 98 /* BUILD Error(Unexpected keyword "interface" after "{".) */
95 /* ERROR Unexpected keyword "interface" after "{". */ 99 /* ERROR Unexpected keyword "interface" after "{". */
(...skipping 14 matching lines...) Expand all
110 /* BUILD Enum(MealType3) */ 114 /* BUILD Enum(MealType3) */
111 enum MealType3 { 115 enum MealType3 {
112 /* BUILD EnumItem(rice) */ 116 /* BUILD EnumItem(rice) */
113 "rice", 117 "rice",
114 /* BUILD EnumItem(noodles) */ 118 /* BUILD EnumItem(noodles) */
115 "noodles", 119 "noodles",
116 /* BUILD EnumItem(other) */ 120 /* BUILD EnumItem(other) */
117 "other" 121 "other"
118 }; 122 };
119 123
OLDNEW
« no previous file with comments | « tools/idl_parser/test_lexer/keywords.in ('k') | tools/idl_parser/test_parser/interface_web.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698