diff --git a/mode/c.py b/mode/c.py index baf71fb..8bcb732 100644 --- a/mode/c.py +++ b/mode/c.py @@ -46,6 +46,11 @@ class CGrammar(Grammar): PatternRule('builtin', r"(?:signed|register|extern|const|static|enum|struct|typedef|union|unsigned|volatile)(?!" + chr2 + ")"), PatternRule('type', r"(?:auto|char|double|float|int|long|short|void|volatile)(?!" + chr2 + ")"), + PatternMatchRule('x', '(' + word + ')( +)(\**)(' + word + ')( *)(\()', + 'type', 'spaces', 'binop', 'function', 'spaces', 'delimiter'), + PatternMatchRule('x', '(' + word + ')(\*+)( +)(' + word + ')( *)(\()', + 'type', 'binop', 'spaces', 'function', 'spaces', 'delimiter'), + PatternMatchRule('x', '(' + word + ')( +)(\**)(' + word + ')', 'type', 'spaces', 'binop', 'identifier'), PatternMatchRule('x', '(' + word + ')(\*+)( +)(' + word + ')',