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

Unified Diff: tools/idl_parser/test_parser/enum_ppapi.idl

Issue 18273002: Add PPAPI style enums to V2 IDL parser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/idl_parser/idl_ppapi_parser.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/idl_parser/test_parser/enum_ppapi.idl
diff --git a/tools/idl_parser/test_parser/enum_web.idl b/tools/idl_parser/test_parser/enum_ppapi.idl
similarity index 77%
copy from tools/idl_parser/test_parser/enum_web.idl
copy to tools/idl_parser/test_parser/enum_ppapi.idl
index 233410c5d5dc8bcc6286db23f7c3d35c2a0d8b85..394e680604f62b28027ed7955bf2bfba76100365 100644
--- a/tools/idl_parser/test_parser/enum_web.idl
+++ b/tools/idl_parser/test_parser/enum_ppapi.idl
@@ -37,19 +37,19 @@ symatics should exist. This is an exact match.
*/
enum MealType1 {
/* BUILD EnumItem (rice) */
- "rice",
+ rice,
/* BUILD EnumItem (noodles) */
- "noodles",
+ noodles,
/* BUILD EnumItem(other) */
- "other"
+ other
};
/* BUILD Error(Enum missing name.) */
/* ERROR Enum missing name. */
enum {
- "rice",
- "noodles",
- "other"
+ rice,
+ noodles,
+ other,
};
/* TREE
@@ -60,60 +60,60 @@ enum {
*/
enum MealType2 {
/* BUILD EnumItem(rice) */
- "rice",
+ rice,
/* BUILD EnumItem(noodles) */
- "noodles",
+ noodles = 1,
/* BUILD EnumItem(other) */
- "other"
+ other
};
-/* BUILD Error(Unexpected string "noodles" after string "rice".) */
-/* ERROR Unexpected string "noodles" after string "rice". */
+/* BUILD Error(Unexpected identifier "noodles" after identifier "rice".) */
+/* ERROR Unexpected identifier "noodles" after identifier "rice". */
enum MissingComma {
- "rice"
- "noodles",
- "other"
+ rice
+ noodles,
+ other
};
/* BUILD Error(Trailing comma in block.) */
/* ERROR Trailing comma in block. */
enum TrailingComma {
- "rice",
- "noodles",
- "other",
+ rice,
+ noodles,
+ other,
};
/* BUILD Error(Unexpected "," after ",".) */
/* ERROR Unexpected "," after ",". */
enum ExtraComma {
- "rice",
- "noodles",
- ,"other",
+ rice,
+ noodles,
+ ,other,
};
/* BUILD Error(Unexpected keyword "interface" after "{".) */
/* ERROR Unexpected keyword "interface" after "{". */
enum ExtraComma {
interface,
- "noodles",
- ,"other",
+ noodles,
+ ,other,
};
-/* BUILD Error(Unexpected identifier "somename" after "{".) */
-/* ERROR Unexpected identifier "somename" after "{". */
+/* BUILD Error(Unexpected string "somename" after "{".) */
+/* ERROR Unexpected string "somename" after "{". */
enum ExtraComma {
- somename,
- "noodles",
- ,"other",
+ "somename",
+ noodles,
+ other,
};
/* BUILD Enum(MealType3) */
enum MealType3 {
/* BUILD EnumItem(rice) */
- "rice",
+ rice = 1 << 1,
/* BUILD EnumItem(noodles) */
- "noodles",
+ noodles = 0x1 << 0x2,
/* BUILD EnumItem(other) */
- "other"
+ other = 012 << 777
};
« no previous file with comments | « tools/idl_parser/idl_ppapi_parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698