diff options
author | Matth?us G. Chajdas <dev@anteru.net> | 2019-04-30 17:48:52 +0200 |
---|---|---|
committer | Matth?us G. Chajdas <dev@anteru.net> | 2019-04-30 17:48:52 +0200 |
commit | 0b839cf4a0acf37677e7b1a85181a628d9959735 (patch) | |
tree | 799582fd7b03c0ba2e1bd07b2a08bd4ff3531f2b /pygments | |
parent | 83e159f05ec8dae7d6e52140b23b363d4c3b18f2 (diff) | |
download | pygments-0b839cf4a0acf37677e7b1a85181a628d9959735.tar.gz |
Simplify a few basic regex.
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/basic.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/basic.py b/pygments/lexers/basic.py index 4d957c2b..1aa3274c 100644 --- a/pygments/lexers/basic.py +++ b/pygments/lexers/basic.py @@ -550,7 +550,7 @@ class VBScriptLexer(RegexLexer): (r'[a-z_][a-z0-9_]*', Name), (r'\b_\n', Operator), (words(r'(),.:'), Punctuation), - ('.+(\n)?', Error) + (r'.+(\n)?', Error) ], 'dim_more': [ (r'(\s*)(,)(\s*)([a-z_][a-z0-9]*)', bygroups(Whitespace, Punctuation, Whitespace, Name.Variable)), @@ -570,7 +570,7 @@ class BBCBasicLexer(RegexLexer): BBC Basic was supplied on the BBC Micro, and later Acorn RISC OS. It is also used by BBC Basic For Windows. - .. versionadded:: 2.4???? + .. versionadded:: 2.4 """ base_keywords = ['OTHERWISE', 'AND', 'DIV', 'EOR', 'MOD', 'OR', 'ERROR', 'LINE', 'OFF', 'STEP', 'SPC', 'TAB', 'ELSE', 'THEN', @@ -620,9 +620,9 @@ class BBCBasicLexer(RegexLexer): (r':', Comment.Preproc), # Some special cases to make functions come out nicer - (r'(DEF)(\s*)(FN|PROC)([A-Za-z_@][A-Za-z0-9_@]*)', + (r'(DEF)(\s*)(FN|PROC)([A-Za-z_@][\w@]*)', bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, Name.Function)), - (r'(FN|PROC)([A-Za-z_@][A-Za-z0-9_@]*)', + (r'(FN|PROC)([A-Za-z_@][\w@]*)', bygroups(Keyword, Name.Function)), (r'(GOTO|GOSUB|THEN|RESTORE)(\s*)(\d+)', @@ -644,7 +644,7 @@ class BBCBasicLexer(RegexLexer): (r'[+-]?[0-9]+E[+-]?[0-9]+', Number.Float), (r'[+-]?\d+', Number.Integer), - (r'([A-Za-z_@][A-Za-z0-9_@]*[%$]?)', Name.Variable), + (r'([A-Za-z_@][\w@]*[%$]?)', Name.Variable), (r'([+\-]=|[$!|?+\-*/%^=><();]|>=|<=|<>|<<|>>|>>>|,)', Operator), ], 'string': [ |