summaryrefslogtreecommitdiff
path: root/pygments/lexers/c_cpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/c_cpp.py')
-rw-r--r--pygments/lexers/c_cpp.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pygments/lexers/c_cpp.py b/pygments/lexers/c_cpp.py
index bbac406e..9904f294 100644
--- a/pygments/lexers/c_cpp.py
+++ b/pygments/lexers/c_cpp.py
@@ -87,15 +87,17 @@ class CFamilyLexer(RegexLexer):
(r'((?:[\w*\s])+?(?:\s|[*]))' # return arguments
r'([a-zA-Z_]\w*)' # method name
r'(\s*\([^;]*?\))' # signature
- r'(' + _ws + r')?(\{)',
+ r'([^;]*)?'
+ r'(\{)',
bygroups(using(this), Name.Function, using(this), using(this),
- Punctuation),
+ Keyword, Punctuation),
'function'),
# function declarations
(r'((?:[\w*\s])+?(?:\s|[*]))' # return arguments
r'([a-zA-Z_]\w*)' # method name
r'(\s*\([^;]*?\))' # signature
- r'(' + _ws + r')?(;)',
+ r'([^;]*)?'
+ r'(;)',
bygroups(using(this), Name.Function, using(this), using(this),
Punctuation)),
default('statement'),