summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-10-07 15:53:45 +0200
committerGeorg Brandl <georg@python.org>2014-10-07 15:53:45 +0200
commit1674b75f1ea10abb390d9e479b058c56bfb2ac4f (patch)
tree37177c23fe2b013857fe3e6b3d12c6f8b19d44d1
parenta8053d446a08ac51e674e96a688046c0e5568968 (diff)
downloadpygments-1674b75f1ea10abb390d9e479b058c56bfb2ac4f.tar.gz
Matlab: fix PEP8, simplify tokens
-rw-r--r--pygments/lexers/matlab.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/pygments/lexers/matlab.py b/pygments/lexers/matlab.py
index b94350cf..badc1fa3 100644
--- a/pygments/lexers/matlab.py
+++ b/pygments/lexers/matlab.py
@@ -13,7 +13,7 @@ import re
from pygments.lexer import Lexer, RegexLexer, bygroups, words, do_insertions
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
- Number, Punctuation, Generic
+ Number, Punctuation, Generic, Whitespace
from pygments.lexers import _scilab_builtins
@@ -89,7 +89,7 @@ class MatlabLexer(RegexLexer):
'return', 'spmd', 'switch', 'try', 'while'), suffix=r'\b'),
Keyword),
- ("(" + "|".join(elfun+specfun+elmat) + r')\b', Name.Builtin),
+ ("(" + "|".join(elfun + specfun + elmat) + r')\b', Name.Builtin),
# line continuation with following comment:
(r'\.\.\..*$', Comment),
@@ -125,9 +125,9 @@ class MatlabLexer(RegexLexer):
],
'deffunc': [
(r'(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
- bygroups(Text.Whitespace, Text, Text.Whitespace, Punctuation,
- Text.Whitespace, Name.Function, Punctuation, Text,
- Punctuation, Text.Whitespace), '#pop'),
+ bygroups(Whitespace, Text, Whitespace, Punctuation,
+ Whitespace, Name.Function, Punctuation, Text,
+ Punctuation, Whitespace), '#pop'),
],
}
@@ -584,9 +584,9 @@ class OctaveLexer(RegexLexer):
],
'deffunc': [
(r'(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
- bygroups(Text.Whitespace, Text, Text.Whitespace, Punctuation,
- Text.Whitespace, Name.Function, Punctuation, Text,
- Punctuation, Text.Whitespace), '#pop'),
+ bygroups(Whitespace, Text, Whitespace, Punctuation,
+ Whitespace, Name.Function, Punctuation, Text,
+ Punctuation, Whitespace), '#pop'),
],
}
@@ -650,8 +650,8 @@ class ScilabLexer(RegexLexer):
],
'deffunc': [
(r'(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
- bygroups(Text.Whitespace, Text, Text.Whitespace, Punctuation,
- Text.Whitespace, Name.Function, Punctuation, Text,
- Punctuation, Text.Whitespace), '#pop'),
+ bygroups(Whitespace, Text, Whitespace, Punctuation,
+ Whitespace, Name.Function, Punctuation, Text,
+ Punctuation, Whitespace), '#pop'),
],
}