summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pygments/lexers/_stan_builtins.py12
-rw-r--r--pygments/lexers/agile.py11
-rw-r--r--pygments/lexers/asm.py2
-rw-r--r--pygments/lexers/math.py2
-rw-r--r--pygments/styles/xcode.py12
-rw-r--r--tests/test_examplefiles.py2
6 files changed, 22 insertions, 19 deletions
diff --git a/pygments/lexers/_stan_builtins.py b/pygments/lexers/_stan_builtins.py
index 1cea6ba4..47e08a92 100644
--- a/pygments/lexers/_stan_builtins.py
+++ b/pygments/lexers/_stan_builtins.py
@@ -1,13 +1,13 @@
# -*- coding: utf-8 -*-
"""
-pygments.lexers._stan_builtins
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ pygments.lexers._stan_builtins
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-This file contains the names of functions for Stan used by
-``pygments.lexers.math.StanLexer.
+ This file contains the names of functions for Stan used by
+ `pygments.lexers.math.StanLexer`.
-:copyright: Copyright 2013 by the Pygments team, see AUTHORS.
-:license: BSD, see LICENSE for details.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
"""
KEYWORDS = ['else', 'for', 'if', 'in', 'lp__', 'print', 'while']
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py
index 0337bec3..c3092666 100644
--- a/pygments/lexers/agile.py
+++ b/pygments/lexers/agile.py
@@ -2301,17 +2301,17 @@ class HyLexer(RegexLexer):
aliases = ['hylang']
filenames = ['*.hy']
mimetypes = ['text/x-hy', 'application/x-hy']
-
+
special_forms = [
'cond', 'for', '->', '->>', 'car',
'cdr', 'first', 'rest', 'let', 'when', 'unless',
'import', 'do', 'progn', 'get', 'slice', 'assoc', 'with-decorator',
- ',', 'list_comp', 'kwapply', '~', 'is', 'in', 'is-not', 'not-in',
+ ',', 'list_comp', 'kwapply', '~', 'is', 'in', 'is-not', 'not-in',
'quasiquote', 'unquote', 'unquote-splice', 'quote', '|', '<<=', '>>=',
- 'foreach', 'while',
+ 'foreach', 'while',
'eval-and-compile', 'eval-when-compile'
]
-
+
declarations = [
'def' 'defn', 'defun', 'defmacro', 'defclass', 'lambda', 'fn', 'setv'
]
@@ -2400,4 +2400,5 @@ class HyLexer(RegexLexer):
}
def analyse_text(text):
- return '(import' in text or '(defn' in text
+ if '(import ' in text or '(defn ' in text:
+ return 0.9
diff --git a/pygments/lexers/asm.py b/pygments/lexers/asm.py
index c599deff..537e0763 100644
--- a/pygments/lexers/asm.py
+++ b/pygments/lexers/asm.py
@@ -286,7 +286,7 @@ class LlvmLexer(RegexLexer):
r'|extractelement|insertelement|shufflevector|getresult'
r'|extractvalue|insertvalue'
-
+
r'|atomicrmw|cmpxchg|fence'
r')\b', Keyword),
diff --git a/pygments/lexers/math.py b/pygments/lexers/math.py
index 52956487..7c146368 100644
--- a/pygments/lexers/math.py
+++ b/pygments/lexers/math.py
@@ -1933,7 +1933,7 @@ class MathematicaLexer(RegexLexer):
'application/vnd.wolfram.mathematica.package',
'application/vnd.wolfram.cdf']
- # http://reference.wolfram.com/mathematica/guide/Syntax.html
+ # http://reference.wolfram.com/mathematica/guide/Syntax.html
operators = [
";;", "=", "=.", "!=" "==", ":=", "->", ":>", "/.", "+", "-", "*", "/",
"^", "&&", "||", "!", "<>", "|", "/;", "?", "@", "//", "/@", "@@",
diff --git a/pygments/styles/xcode.py b/pygments/styles/xcode.py
index 981e3095..84fe99af 100644
--- a/pygments/styles/xcode.py
+++ b/pygments/styles/xcode.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""
pygments.styles.xcode
- ~~~~~~~~~~~~~~~~~~~~~~
+ ~~~~~~~~~~~~~~~~~~~~~
Style similar to the `Xcode` default theme.
@@ -11,7 +11,7 @@
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String, Error, \
- Number, Operator, Generic, Whitespace, Text, Other, Literal, Punctuation
+ Number, Operator
class XcodeStyle(Style):
@@ -27,7 +27,7 @@ class XcodeStyle(Style):
String: '#C41A16',
String.Char: '#2300CE',
-
+
Operator: '#000000',
Keyword: '#AA0D92',
@@ -37,11 +37,13 @@ class XcodeStyle(Style):
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
+ # In Obj-C code this token is used to colour Cocoa types
+ Name.Builtin.Pseudo: '#5B269A',
Name.Variable: '#000000',
Name.Tag: '#000000',
Name.Decorator: '#000000',
- Name.Label: '#000000', # Workaround for a BUG here: lexer treats multiline method signatres as labels
+ # Workaround for a BUG here: lexer treats multiline method signatres as labels
+ Name.Label: '#000000',
Number: '#2300CE',
Error: '#000000',
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py
index 4beaa0c7..d3d91241 100644
--- a/tests/test_examplefiles.py
+++ b/tests/test_examplefiles.py
@@ -38,7 +38,7 @@ def test_example_files():
code = code.decode('utf-8')
except UnicodeError:
code = code.decode('latin1')
-
+
outfn = os.path.join(outdir, fn)
lx = None