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

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

Issue 8161006: Allow enum values in IDL files to be simple arithmetic expressions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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_lex.in ('k') | no next file » | 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,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 /* OK EnumItem(E12) */ 55 /* OK EnumItem(E12) */
56 E12 = 12, 56 E12 = 12,
57 /* OK EnumItem(E13) */ 57 /* OK EnumItem(E13) */
58 E13 = 13.0, 58 E13 = 13.0,
59 /* FAIL Unexpected string "hello" after "=". */ 59 /* FAIL Unexpected string "hello" after "=". */
60 /* OK EnumItem(E14) */ 60 /* OK EnumItem(E14) */
61 E14 = "hello", 61 E14 = "hello",
62 /* OK EnumItem(E15) */ 62 /* OK EnumItem(E15) */
63 E15 = 0x400 63 E15 = 0x400
64 }; 64 };
65
66 /* OK Enum(Es9) */
67 enum Es9 {
68 /* OK EnumItem(Es9_1) */
69 Es9_1 = 0,
70 /* OK EnumItem(Es9_2) */
71 Es9_2 = Es9_1,
72 /* OK EnumItem(Es9_3) */
73 Es9_3 = Es9_1 << Es9_2,
74 /* OK EnumItem(Es9_3a) */
75 /* FAIL Unexpected symbol Es9_2 after symbol Es9_1. */
76 Es9_3a = Es9_1 Es9_2,
77 /* OK EnumItem(Es9_4) */
78 Es9_4 = Es9_1 >> Es9_2,
79 /* OK EnumItem(Es9_5) */
80 Es9_5 = Es9_1 | Es9_2,
81 /* OK EnumItem(Es9_6) */
82 Es9_6 = Es9_1 & Es9_2,
83 /* OK EnumItem(Es9_7) */
84 Es9_7 = Es9_1 ^ Es9_2,
85 /* OK EnumItem(Es9_8) */
86 Es9_8 = Es9_1 + Es9_2,
87 /* OK EnumItem(Es9_9) */
88 Es9_9 = Es9_1 - Es9_2,
89 /* OK EnumItem(Es9_10) */
90 Es9_10 = Es9_1 * Es9_2,
91 /* OK EnumItem(Es9_11) */
92 Es9_11 = Es9_1 / Es9_2,
93 /* OK EnumItem(Es9_12) */
94 Es9_12 = -Es9_1,
95 /* OK EnumItem(Es9_13) */
96 Es9_13 = ~Es9_1,
97 /* OK EnumItem(Es9_14) */
98 Es9_14 = (Es9_1),
99 /* OK EnumItem(Es9_14a) */
100 /* FAIL Unexpected ,. */
101 Es9_14a = (Es9_1,
102 /* OK EnumItem(Es9_15) */
103 Es9_15 = (Es9_1 + Es9_2) << Es9_3 + 1,
104 /* OK EnumItem(Es9_16) */
105 Es9_16 = Es9_1 + -Es9_2
106 };
107
108
OLDNEW
« no previous file with comments | « ppapi/generators/test_lex.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698