| 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 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |