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

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
« ppapi/generators/idl_parser.py ('K') | « 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 Es9_1 = 0,
noelallen1 2011/10/06 20:51:44 Should mark these as /* OK EnumItem(Es9_1) */ ...
bbudge 2011/10/07 00:04:52 Done.
69 Es9_2 = Es9_1,
70 Es9_3 = Es9_1 << Es9_2,
71 /* FAIL Unexpected symbol Es9_2 after symbol Es9_1. */
72 Es9_3a = Es9_1 Es9_2,
73 Es9_4 = Es9_1 >> Es9_2,
74 Es9_5 = Es9_1 | Es9_2,
75 Es9_6 = Es9_1 & Es9_2,
76 Es9_7 = Es9_1 ^ Es9_2,
77 Es9_8 = Es9_1 + Es9_2,
78 Es9_9 = Es9_1 - Es9_2,
79 Es9_10 = Es9_1 * Es9_2,
80 Es9_11 = Es9_1 / Es9_2,
81 Es9_12 = -Es9_1,
82 Es9_13 = ~Es9_1,
83 Es9_14 = (Es9_1),
84 /* FAIL Unexpected ,. */
85 Es9_14a = (Es9_1,
86 Es9_15 = (Es9_1 + Es9_2) << Es9_3 + 1,
87 Es9_16 = Es9_1 + -Es9_2
88 };
89
90
OLDNEW
« ppapi/generators/idl_parser.py ('K') | « ppapi/generators/test_lex.in ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698