branch : pmacs2
This commit is contained in:
moculus 2009-04-03 21:36:37 +00:00
parent f7ceeb3dda
commit 4df49ab1e9
1 changed files with 22 additions and 21 deletions

View File

@ -59,9 +59,9 @@ class CGrammar(Grammar):
'type', 'binop', 'spaces', 'function', 'spaces', 'delimiter'), 'type', 'binop', 'spaces', 'function', 'spaces', 'delimiter'),
PatternMatchRule('x', '(' + word + ')( +)(\**)(' + word + ')', PatternMatchRule('x', '(' + word + ')( +)(\**)(' + word + ')',
'type', 'spaces', 'binop', 'identifier'), 'type', 'spaces', 'binop', 'c.identifier'),
PatternMatchRule('x', '(' + word + ')(\*+)( +)(' + word + ')', PatternMatchRule('x', '(' + word + ')(\*+)( +)(' + word + ')',
'type', 'binop', 'spaces', 'identifier'), 'type', 'binop', 'spaces', 'c.identifier'),
PatternRule('function', word + r'(?= *\()'), PatternRule('function', word + r'(?= *\()'),
@ -82,7 +82,7 @@ class CGrammar(Grammar):
PatternRule('char', r"'.'|'\\.'|'\\[0-7]{3}'"), PatternRule('char', r"'.'|'\\.'|'\\[0-7]{3}'"),
PatternMatchRule('x', r'(# *include)( +)(.+)(\n|$)', PatternMatchRule('x', r'(# *include)( +)(.+)(\n|$)',
'macro.start', 'spaces', 'header', 'macro.end'), 'macro.start', 'spaces', 'header', 'macro.end'),
PatternRule('identifier', word), PatternRule('c.identifier', word),
OverridePatternRule('comment', r'/\* *@@:(?P<token>[.a-zA-Z0-9_]+):(?P<mode>[.a-zA-Z0-9_]+) *\*/$'), OverridePatternRule('comment', r'/\* *@@:(?P<token>[.a-zA-Z0-9_]+):(?P<mode>[.a-zA-Z0-9_]+) *\*/$'),
OverridePatternRule('comment', r'// *@@:(?P<token>[.a-zA-Z0-9_]+):(?P<mode>[.a-zA-Z0-9_]+) *$'), OverridePatternRule('comment', r'// *@@:(?P<token>[.a-zA-Z0-9_]+):(?P<mode>[.a-zA-Z0-9_]+) *$'),
] ]
@ -174,6 +174,7 @@ class C(Fundamental):
commentc = '//' commentc = '//'
colors = { colors = {
'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'),