From 98f4c454114532d9f42b015362d5806af1c7eb08 Mon Sep 17 00:00:00 2001 From: Clemens Hammacher Date: Fri, 7 Dec 2018 16:19:36 +0100 Subject: [PATCH] Adapt class decl regexp to match V8's decorators This also allows digits in class decorators, to also match macros like V8_EXPORT_PRIVATE. --- cpplint/cpplint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpplint/cpplint.py b/cpplint/cpplint.py index 65baa6c..0abba8d 100755 --- a/cpplint/cpplint.py +++ b/cpplint/cpplint.py @@ -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)):