summaryrefslogtreecommitdiff
path: root/pygments/styles/stata.py
diff options
context:
space:
mode:
authorMauricio Caceres <mauricio.caceres.bravo@gmail.com>2016-05-09 06:32:27 -0400
committerMauricio Caceres <mauricio.caceres.bravo@gmail.com>2016-05-09 06:32:27 -0400
commit7d98d41dce9c173decd7807df206f246ec3fc12a (patch)
tree3d079f120eecfc1de564c07d8896c10e048d7b3b /pygments/styles/stata.py
parent46d327ffec931b5cc09d2b03f491e115ecc31007 (diff)
downloadpygments-git-7d98d41dce9c173decd7807df206f246ec3fc12a.tar.gz
Added syntax support and (very simple) styles for SAS and Stata
Diffstat (limited to 'pygments/styles/stata.py')
-rw-r--r--pygments/styles/stata.py40
1 files changed, 40 insertions, 0 deletions
diff --git a/pygments/styles/stata.py b/pygments/styles/stata.py
new file mode 100644
index 00000000..2f79a436
--- /dev/null
+++ b/pygments/styles/stata.py
@@ -0,0 +1,40 @@
+# -*- coding: utf-8 -*-
+"""
+ pygments.styles.stata
+ ~~~~~~~~~~~~~~~~~~~~~
+
+ Style inspired by Stata's do-file editor. Note this is not meant
+ to be a complete style. It's merely meant to mimic Stata's do file
+ editor syntax highlighting.
+"""
+
+from pygments.style import Style
+from pygments.token import Keyword, Name, Comment, String, Error, \
+ Number, Operator, Whitespace
+
+
+class StataStyle(Style):
+ """
+ Style inspired by Stata's do-file editor. Note this is not meant
+ to be a complete style. It's merely meant to mimic Stata's do file
+ editor syntax highlighting.
+ """
+
+ default_style = ''
+
+ styles = {
+ Whitespace: '#bbbbbb',
+ Comment: 'italic #008800',
+ # Comment: 'italic #898989',
+ String: '#7a2424',
+ Number: '#2c2cff',
+ Operator: '',
+ Keyword: 'bold #353580',
+ Keyword.Constant: '',
+ Name.Function: '#2c2cff',
+ Name.Variable: 'bold #35baba',
+ Name.Variable.Global: 'bold #b5565e',
+ # Name.Variable: 'bold #7EC0EE',
+ # Name.Variable.Global: 'bold #BE646C',
+ Error: 'bg:#e3d2d2 #a61717'
+ }