mirror of
https://github.com/google/styleguide.git
synced 2024-03-22 13:11:43 +08:00
Adapt class decl regexp to match V8's decorators
This also allows digits in class decorators, to also match macros like V8_EXPORT_PRIVATE.
This commit is contained in:
parent
6271f3f473
commit
98f4c45411
2
cpplint/cpplint.py
vendored
2
cpplint/cpplint.py
vendored
|
@ -2653,7 +2653,7 @@ class NestingState(object):
|
|||
# };
|
||||
class_decl_match = Match(
|
||||
r'^(\s*(?:template\s*<[\w\s<>,:]*>\s*)?'
|
||||
r'(class|struct)\s+(?:[A-Z_]+\s+)*(\w+(?:::\w+)*))'
|
||||
r'(class|struct)\s+(?:[A-Z0-9_]+\s+)*(\w+(?:::\w+)*))'
|
||||
r'(.*)$', line)
|
||||
if (class_decl_match and
|
||||
(not self.stack or self.stack[-1].open_parentheses == 0)):
|
||||
|
|
Loading…
Reference in New Issue
Block a user