diff options
| author | Georg Brandl <georg@python.org> | 2014-01-10 10:08:13 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2014-01-10 10:08:13 +0100 |
| commit | c68bb4e8176d57deead99b768847b87c73c8699e (patch) | |
| tree | 0330a4e8f1263c58e03509364dc0fcd52813ca4d /pygments/styles | |
| parent | 1fede84d263990555cc90d585642e8c338f47b3d (diff) | |
| parent | db761d984af38381560e7b5a1100ef4ae1c95d59 (diff) | |
| download | pygments-c68bb4e8176d57deead99b768847b87c73c8699e.tar.gz | |
Merged in kprofic/pygments-main (pull request #265)
Objective-C improvements
Diffstat (limited to 'pygments/styles')
| -rw-r--r-- | pygments/styles/__init__.py | 1 | ||||
| -rw-r--r-- | pygments/styles/xcode.py | 48 |
2 files changed, 49 insertions, 0 deletions
diff --git a/pygments/styles/__init__.py b/pygments/styles/__init__.py index 3d6ef73c..dea31eac 100644 --- a/pygments/styles/__init__.py +++ b/pygments/styles/__init__.py @@ -34,6 +34,7 @@ STYLE_MAP = { 'vs': 'vs::VisualStudioStyle', 'tango': 'tango::TangoStyle', 'rrt': 'rrt::RrtStyle', + 'xcode': 'xcode::XcodeStyle', } diff --git a/pygments/styles/xcode.py b/pygments/styles/xcode.py new file mode 100644 index 00000000..981e3095 --- /dev/null +++ b/pygments/styles/xcode.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +""" + pygments.styles.xcode + ~~~~~~~~~~~~~~~~~~~~~~ + + Style similar to the `Xcode` default theme. + + :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.style import Style +from pygments.token import Keyword, Name, Comment, String, Error, \ + Number, Operator, Generic, Whitespace, Text, Other, Literal, Punctuation + + +class XcodeStyle(Style): + """ + Style similar to the Xcode default colouring theme. + """ + + default_style = '' + + styles = { + Comment: '#177500', + Comment.Preproc: '#633820', + + String: '#C41A16', + String.Char: '#2300CE', + + Operator: '#000000', + + Keyword: '#AA0D92', + + Name: '#000000', + Name.Attribute: '#836C28', + Name.Class: '#000000', + Name.Function: '#000000', + Name.Builtin: '#AA0D92', + Name.Builtin.Pseudo: '#5B269A', # In Obj-C code this token is used to colour Cocoa types + Name.Variable: '#000000', + Name.Tag: '#000000', + Name.Decorator: '#000000', + Name.Label: '#000000', # Workaround for a BUG here: lexer treats multiline method signatres as labels + + Number: '#2300CE', + Error: '#000000', + } |
