diff options
author | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 22:43:04 +0000 |
---|---|---|
committer | bbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-07 22:43:04 +0000 |
commit | a2365a2cc33bf237617b0632c927d9987f9d816c (patch) | |
tree | ef43d9037e8d17d3fcaaf8ced2f64b4288f93ddd /ppapi/generators/test_parser/enum.idl | |
parent | acb2299648c3f60917946b4d87714e09d5815da6 (diff) | |
download | chromium_src-a2365a2cc33bf237617b0632c927d9987f9d816c.zip chromium_src-a2365a2cc33bf237617b0632c927d9987f9d816c.tar.gz chromium_src-a2365a2cc33bf237617b0632c927d9987f9d816c.tar.bz2 |
Allow enums values to be simple arithmetic expressions.
BUG=none
TEST=./generator.py test_parser/enum.idl
Review URL: http://codereview.chromium.org/8161006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104588 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/generators/test_parser/enum.idl')
-rw-r--r-- | ppapi/generators/test_parser/enum.idl | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ppapi/generators/test_parser/enum.idl b/ppapi/generators/test_parser/enum.idl index a33f224..0924728 100644 --- a/ppapi/generators/test_parser/enum.idl +++ b/ppapi/generators/test_parser/enum.idl @@ -62,3 +62,47 @@ enum Es8 { /* OK EnumItem(E15) */ E15 = 0x400 }; + +/* OK Enum(Es9) */ +enum Es9 { + /* OK EnumItem(Es9_1) */ + Es9_1 = 0, + /* OK EnumItem(Es9_2) */ + Es9_2 = Es9_1, + /* OK EnumItem(Es9_3) */ + Es9_3 = Es9_1 << Es9_2, + /* OK EnumItem(Es9_3a) */ + /* FAIL Unexpected symbol Es9_2 after symbol Es9_1. */ + Es9_3a = Es9_1 Es9_2, + /* OK EnumItem(Es9_4) */ + Es9_4 = Es9_1 >> Es9_2, + /* OK EnumItem(Es9_5) */ + Es9_5 = Es9_1 | Es9_2, + /* OK EnumItem(Es9_6) */ + Es9_6 = Es9_1 & Es9_2, + /* OK EnumItem(Es9_7) */ + Es9_7 = Es9_1 ^ Es9_2, + /* OK EnumItem(Es9_8) */ + Es9_8 = Es9_1 + Es9_2, + /* OK EnumItem(Es9_9) */ + Es9_9 = Es9_1 - Es9_2, + /* OK EnumItem(Es9_10) */ + Es9_10 = Es9_1 * Es9_2, + /* OK EnumItem(Es9_11) */ + Es9_11 = Es9_1 / Es9_2, + /* OK EnumItem(Es9_12) */ + Es9_12 = -Es9_1, + /* OK EnumItem(Es9_13) */ + Es9_13 = ~Es9_1, + /* OK EnumItem(Es9_14) */ + Es9_14 = (Es9_1), + /* OK EnumItem(Es9_14a) */ + /* FAIL Unexpected ,. */ + Es9_14a = (Es9_1, + /* OK EnumItem(Es9_15) */ + Es9_15 = (Es9_1 + Es9_2) << Es9_3 + 1, + /* OK EnumItem(Es9_16) */ + Es9_16 = Es9_1 + -Es9_2 +}; + + |