parent
8d555b661b
commit
c27fdd3ff0
10
mode/c.py
10
mode/c.py
|
@ -54,14 +54,14 @@ class CGrammar(Grammar):
|
||||||
PatternRule('type', r"(?:auto|char|double|float|int|long|short|void|volatile)(?!" + chr2 + ")"),
|
PatternRule('type', r"(?:auto|char|double|float|int|long|short|void|volatile)(?!" + chr2 + ")"),
|
||||||
|
|
||||||
PatternMatchRule('x', '(' + word + ')( +)(\**)(' + word + ')( *)(\()',
|
PatternMatchRule('x', '(' + word + ')( +)(\**)(' + word + ')( *)(\()',
|
||||||
'type', 'spaces', 'binop', 'function', 'spaces', 'delimiter'),
|
'type', 'spaces', 'operator', 'function', 'spaces', 'delimiter'),
|
||||||
PatternMatchRule('x', '(' + word + ')(\*+)( +)(' + word + ')( *)(\()',
|
PatternMatchRule('x', '(' + word + ')(\*+)( +)(' + word + ')( *)(\()',
|
||||||
'type', 'binop', 'spaces', 'function', 'spaces', 'delimiter'),
|
'type', 'operator', 'spaces', 'function', 'spaces', 'delimiter'),
|
||||||
|
|
||||||
PatternMatchRule('x', '(' + word + ')( +)(\**)(' + word + ')',
|
PatternMatchRule('x', '(' + word + ')( +)(\**)(' + word + ')',
|
||||||
'type', 'spaces', 'binop', 'c.identifier'),
|
'type', 'spaces', 'operator', 'c.identifier'),
|
||||||
PatternMatchRule('x', '(' + word + ')(\*+)( +)(' + word + ')',
|
PatternMatchRule('x', '(' + word + ')(\*+)( +)(' + word + ')',
|
||||||
'type', 'binop', 'spaces', 'c.identifier'),
|
'type', 'operator', 'spaces', 'c.identifier'),
|
||||||
|
|
||||||
|
|
||||||
PatternRule('function', word + r'(?= *\()'),
|
PatternRule('function', word + r'(?= *\()'),
|
||||||
|
@ -174,7 +174,7 @@ class C(Fundamental):
|
||||||
commentc = '//'
|
commentc = '//'
|
||||||
|
|
||||||
colors = {
|
colors = {
|
||||||
'c.identifier': ('yellow', 'default', 'bold'),
|
#'c.identifier': ('yellow', 'default', 'bold'),
|
||||||
'macrocomment.start': ('red', 'default', 'bold'),
|
'macrocomment.start': ('red', 'default', 'bold'),
|
||||||
'macrocomment.null': ('red', 'default', 'bold'),
|
'macrocomment.null': ('red', 'default', 'bold'),
|
||||||
'macrocomment.end': ('red', 'default', 'bold'),
|
'macrocomment.end': ('red', 'default', 'bold'),
|
||||||
|
|
Loading…
Reference in New Issue