| Index: build/android/gyp/java_cpp_enum.py
|
| diff --git a/build/android/gyp/java_cpp_enum.py b/build/android/gyp/java_cpp_enum.py
|
| index 16039599ba7aa73ff07b35a96ad5ca0222f48d29..c2f1764b1be9ade87751aa7a8c8f4afa1f93abc6 100755
|
| --- a/build/android/gyp/java_cpp_enum.py
|
| +++ b/build/android/gyp/java_cpp_enum.py
|
| @@ -15,6 +15,9 @@ from util import build_utils
|
|
|
| # List of C++ types that are compatible with the Java code generated by this
|
| # script.
|
| +#
|
| +# This script can parse .idl files however, at present it ignores special
|
| +# rules such as [cpp_enum_prefix_override="ax_attr"].
|
| ENUM_FIXED_TYPE_WHITELIST = ['char', 'unsigned char',
|
| 'short', 'unsigned short',
|
| 'int', 'int8_t', 'int16_t', 'int32_t', 'uint8_t', 'uint16_t']
|
| @@ -134,8 +137,9 @@ class HeaderParser(object):
|
| optional_class_or_struct_re = r'(class|struct)?'
|
| enum_name_re = r'(\w+)'
|
| optional_fixed_type_re = r'(\:\s*(\w+\s*\w+?))?'
|
| - enum_start_re = re.compile(r'^\s*enum\s+' + optional_class_or_struct_re +
|
| - '\s*' + enum_name_re + '\s*' + optional_fixed_type_re + '\s*{\s*$')
|
| + enum_start_re = re.compile(r'^\s*(?:\[cpp.*\])?\s*enum\s+' +
|
| + optional_class_or_struct_re + '\s*' + enum_name_re + '\s*' +
|
| + optional_fixed_type_re + '\s*{\s*$')
|
|
|
| def __init__(self, lines, path=None):
|
| self._lines = lines
|
|
|