diff options
author | Krzysztof Profic <kprofic@gmail.com> | 2013-12-13 11:47:49 +0100 |
---|---|---|
committer | Krzysztof Profic <kprofic@gmail.com> | 2013-12-13 11:47:49 +0100 |
commit | 4b075cfd2050949bfa3ea363531b0f6f6f70bed2 (patch) | |
tree | b984a56ea5bee54a69b0e4e218bf923a9f9803fa /pygments/styles | |
parent | 0e187dc6d5b3735c7fe82d79e6c2ceebeebc2d55 (diff) | |
download | pygments-4b075cfd2050949bfa3ea363531b0f6f6f70bed2.tar.gz |
Added draft of Xcode default style
Diffstat (limited to 'pygments/styles')
-rw-r--r-- | pygments/styles/__init__.py | 1 | ||||
-rw-r--r-- | pygments/styles/xcode.py | 56 |
2 files changed, 57 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..26d92ed7 --- /dev/null +++ b/pygments/styles/xcode.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +""" + pygments.styles.xcode + ~~~~~~~~~~~~~~~~~~~~~~ + + Style similar to the `Xcode`_ default style. + + :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 style. + """ + + default_style = '' + + styles = { + Comment: '#177500', + Comment.Preproc: '#633820', + + String: '#C41A16', + String.Char: '#2300CE', + + Operator: '#000000', + # Operator.Word: '#ff0072', + + Keyword: '#AA0D92', + # Keyword.Type: '#000000', + + Name: '#000000', + Name.Attribute: '#836C28', + Name.Class: '#000000', + Name.Function: '#000000', + # Name.Property: '#000000', + # Name.Namespace: '#000000', + Name.Builtin: '#AA0D92', + # Name.Builtin.Pseudo: '#000000', + Name.Variable: '#000000', # it was method argument (but not always recognized successfully) + # Name.Variable.Class: '#000000', + # Name.Variable.Instance: '#000000', + # Name.Variable.Global: '#000000', + # Name.Constant: '#000000', + Name.Tag: '#000000', + Name.Decorator: '#000000', # category name in braces + Name.Label: '#000000', # here is a little bug, it treats multiline method signatres as labels (second and later lines) + + Number: '#2300CE', + Error: '#000000', # @ char when using as acronym for NSNumber @(10) and also in nonrecognized tokens like: @autoreleasepool, @required - only @ char + } |