diff options
author | Tim Hatch <tim@timhatch.com> | 2014-05-16 17:49:49 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-05-16 17:49:49 -0700 |
commit | 97422c5ed7200eeb588cf07f3e63cd1a80016f15 (patch) | |
tree | d34ff1aea3c8641eea785f0cb430bfa4a2630fdd /pygments/lexers/shell.py | |
parent | c5af6ba52c15caee0bce29fba439c8495feea1a7 (diff) | |
parent | 234df186957e0b4419d4a587daaea97dee27d484 (diff) | |
download | pygments-97422c5ed7200eeb588cf07f3e63cd1a80016f15.tar.gz |
Merged in dietmarw/pygments-main (pull request #348)
Modelica-lexer: Add "end" to keyword list again
Diffstat (limited to 'pygments/lexers/shell.py')
-rw-r--r-- | pygments/lexers/shell.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index f809dae9..df9b56f4 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -79,7 +79,7 @@ class BashLexer(RegexLexer): 'curly': [ (r'}', Keyword, '#pop'), (r':-', Keyword), - (r'[a-zA-Z0-9_]+', Name.Variable), + (r'\w+', Name.Variable), (r'[^}:"\'`$]+', Punctuation), (r':', Punctuation), include('root'), @@ -314,7 +314,7 @@ class TcshLexer(RegexLexer): 'curly': [ (r'}', Keyword, '#pop'), (r':-', Keyword), - (r'[a-zA-Z0-9_]+', Name.Variable), + (r'\w+', Name.Variable), (r'[^}:"\'`$]+', Punctuation), (r':', Punctuation), include('root'), @@ -390,13 +390,13 @@ class PowerShellLexer(RegexLexer): (r'`[\'"$@-]', Punctuation), (r'"', String.Double, 'string'), (r"'([^']|'')*'", String.Single), - (r'(\$|@@|@)((global|script|private|env):)?[a-z0-9_]+', + (r'(\$|@@|@)((global|script|private|env):)?\w+', Name.Variable), (r'(%s)\b' % '|'.join(keywords), Keyword), (r'-(%s)\b' % '|'.join(operators), Operator), - (r'(%s)-[a-z_][a-z0-9_]*\b' % '|'.join(verbs), Name.Builtin), - (r'\[[a-z_\[][a-z0-9_. `,\[\]]*\]', Name.Constant), # .net [type]s - (r'-[a-z_][a-z0-9_]*', Name), + (r'(%s)-[a-z_]\w*\b' % '|'.join(verbs), Name.Builtin), + (r'\[[a-z_\[][\w. `,\[\]]*\]', Name.Constant), # .net [type]s + (r'-[a-z_]\w*', Name), (r'\w+', Name), (r'[.,;@{}\[\]$()=+*/\\&%!~?^`|<>-]|::', Punctuation), ], |