diff options
author | blackbird <devnull@localhost> | 2007-01-12 15:05:04 +0100 |
---|---|---|
committer | blackbird <devnull@localhost> | 2007-01-12 15:05:04 +0100 |
commit | 36a6d94383feaf011b8af2a8706b37948fb817fa (patch) | |
tree | 5e51413429788fa0ffb217040ff3a539d9e5af37 | |
parent | a41305771899a6b3310c186ae1753e6004eceb54 (diff) | |
download | pygments-36a6d94383feaf011b8af2a8706b37948fb817fa.tar.gz |
[svn] Updated sources.list lexer
-rw-r--r-- | pygments/lexers/text.py | 25 | ||||
-rw-r--r-- | pygments/styles/fruity.py | 3 |
2 files changed, 26 insertions, 2 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py index 3ba07da5..e93f7435 100644 --- a/pygments/lexers/text.py +++ b/pygments/lexers/text.py @@ -60,9 +60,30 @@ class SourcesListLexer(RegexLexer): tokens = { 'root': [ + (r'\s+', Text), (r'#.*?$', Comment), - (r'(deb(?:-src)?)(\s+)(\S+)(\s+)(\S+)([^#\n]*)', - bygroups(Name.Builtin, Text, Name.Class, Text, String, Text)) + (r'^(deb(?:-src)?)(\s+)', + bygroups(Keyword, Text), 'distribution') + ], + 'distribution': [ + (r'#.*?$', Comment, '#pop'), + (r'\$\(ARCH\)', Name.Variable), + (r'[^\s$[]+', String), + (r'\[', String.Other, 'escaped-distribution'), + (r'\$', String), + (r'\s+', Text, 'components') + ], + 'escaped-distribution': [ + (r'\]', String.Other, '#pop'), + (r'\$\(ARCH\)', Name.Variable), + (r'[^\]$]+', String.Other), + (r'\$', String.Other) + ], + 'components': [ + (r'#.*?$', Comment, '#pop:2'), + (r'$', Text, '#pop:2'), + (r'\s+', Text), + (r'\S+', Keyword.Pseudo), ] } diff --git a/pygments/styles/fruity.py b/pygments/styles/fruity.py index fff1072b..b2991b9c 100644 --- a/pygments/styles/fruity.py +++ b/pygments/styles/fruity.py @@ -20,8 +20,11 @@ class FruityStyle(Style): Token: '#ffffff', Generic.Output: '#444444 bg:#222222', Keyword: '#fb660a bold', + Keyword.Pseudo: 'nobold', Number: '#0086f7 bold', Name.Tag: '#fb660a bold', + Name.Variable: '#fb660a', + Name.Constant: '#fb660a', Comment: '#008800 bg:#0f140f italic', Name.Attribute: '#ff0086 bold', String: '#0086d2', |