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

Unified Diff: build/android/gyp/java_cpp_enum.py

Issue 1137393003: Add style information to the snapshot node (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add content dependency to ui_accessibility_java for GN Created 5 years, 7 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
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

Powered by Google App Engine
This is Rietveld 408576698