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

Side by Side Diff: ppapi/generators/test_parser/enum.idl

Issue 7272043: Update Lexer/Parser to support '#inline' and 'label' (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/generators/test_namespace/foo.idl ('k') | ppapi/generators/test_parser/interface.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) 2011 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2011 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 /* This file tests parsing of enumerations under different conditions */ 5 /* This file tests parsing of enumerations under different conditions */
6 6
7 /* OK Enum(Es1) */ 7 /* OK Enum(Es1) */
8 enum Es1 { 8 enum Es1 {
9 /* OK EnumItem(E1) */ 9 /* OK EnumItem(E1) */
10 E1 = 1, 10 E1 = 1,
11 /* OK EnumItem(E2) */ 11 /* OK EnumItem(E2) */
12 E2 = 2 12 E2 = 2
13 }; 13 };
14 14
15 /* FAIL Enum missing name. */ 15 /* FAIL Enum missing name. */
16 enum { 16 enum {
17 E3 = 3, 17 E3 = 3,
18 E4 = 4 18 E4 = 4
19 }; 19 };
20 20
21 /* OK Enum(Es3) */ 21 /* OK Enum(Es3) */
22 enum Es3 { 22 enum Es3 {
23 E5 = 5, 23 E5 = 1 << 1,
24 E6 = 6 24 E6 = 3 << 2
25 }; 25 };
26 26
27 /* FAIL Unexpected empty block. */ 27 /* FAIL Unexpected empty block. */
28 enum Es4 { 28 enum Es4 {
29 }; 29 };
30 30
31 /* OK Enum(Es5) */ 31 /* OK Enum(Es5) */
32 enum Es5 { 32 enum Es5 {
33 /* OK EnumItem(E9) */ 33 /* OK EnumItem(E9) */
34 E9 = 9, 34 E9 = 9,
35 /* OK EnumItem(E10) */ 35 /* OK EnumItem(E10) */
36 /* FAIL Trailing comma in block. */ 36 /* FAIL Trailing comma in block. */
37 E10 = 10, 37 E10 = 10,
38 }; 38 };
39 39
40 /* FAIL Unexpected trailing comment. */ 40 /* FAIL Unexpected trailing comment. */
41 enum Es6 { 41 enum Es6 {
42 E5 = 11, 42 E5 = 11,
43 E6 = 12 43 E6 = 12
44 } 44 }
45 45
46 /* OK Enum(Es7) */ 46 /* OK Enum(Es7) */
47 enum Es7 { 47 enum Es7 {
48 /* OK EnumItem(E11) */ 48 /* OK EnumItem(E11) */
49 E11 = 11 49 E11 = 11
50 }; 50 };
51
52
53 /* OK Enum(Es8) */
54 enum Es8 {
55 /* OK EnumItem(E12) */
56 E12 = 12,
57 /* OK EnumItem(E13) */
58 E13 = 13.0,
59 /* FAIL Unexpected string "hello" after "=". */
60 /* OK EnumItem(E14) */
61 E14 = "hello",
62 /* OK EnumItem(E15) */
63 E15 = 0x400
64 };
OLDNEW
« no previous file with comments | « ppapi/generators/test_namespace/foo.idl ('k') | ppapi/generators/test_parser/interface.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698