summaryrefslogtreecommitdiff
path: root/pygments/lexers/basic.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2020-09-07 07:55:53 +0200
committerGeorg Brandl <georg@python.org>2020-09-07 07:55:55 +0200
commit080bbeb859d3346c221f7dcac1ae1822676bec6f (patch)
treec1efe8651eccd963f9198c91fe6285922b5af221 /pygments/lexers/basic.py
parentd464bf55dabfe4f34e97e9c9f1617f5a508807fd (diff)
downloadpygments-git-080bbeb859d3346c221f7dcac1ae1822676bec6f.tar.gz
all: revert changes of [a-zA-Z0-9_] to \w
... which is not equivalent in Unicode mode
Diffstat (limited to 'pygments/lexers/basic.py')
-rw-r--r--pygments/lexers/basic.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pygments/lexers/basic.py b/pygments/lexers/basic.py
index a766a949..0e46f23b 100644
--- a/pygments/lexers/basic.py
+++ b/pygments/lexers/basic.py
@@ -523,15 +523,15 @@ class VBScriptLexer(RegexLexer):
(r'[0-9]+\.[0-9]*(e[+-]?[0-9]+)?', Number.Float),
(r'\.[0-9]+(e[+-]?[0-9]+)?', Number.Float), # Float variant 2, for example: .1, .1e2
(r'[0-9]+e[+-]?[0-9]+', Number.Float), # Float variant 3, for example: 123e45
- (r'\d+', Number.Integer),
+ (r'[0-9]+', Number.Integer),
('#.+#', String), # date or time value
- (r'(dim)(\s+)([a-z_]\w*)',
+ (r'(dim)(\s+)([a-z_][a-z0-9_]*)',
bygroups(Keyword.Declaration, Whitespace, Name.Variable), 'dim_more'),
- (r'(function|sub)(\s+)([a-z_]\w*)',
+ (r'(function|sub)(\s+)([a-z_][a-z0-9_]*)',
bygroups(Keyword.Declaration, Whitespace, Name.Function)),
- (r'(class)(\s+)([a-z_]\w*)',
+ (r'(class)(\s+)([a-z_][a-z0-9_]*)',
bygroups(Keyword.Declaration, Whitespace, Name.Class)),
- (r'(const)(\s+)([a-z_]\w*)',
+ (r'(const)(\s+)([a-z_][a-z0-9_]*)',
bygroups(Keyword.Declaration, Whitespace, Name.Constant)),
(r'(end)(\s+)(class|function|if|property|sub|with)',
bygroups(Keyword, Whitespace, Keyword)),
@@ -540,7 +540,7 @@ class VBScriptLexer(RegexLexer):
(r'(on)(\s+)(error)(\s+)(resume)(\s+)(next)',
bygroups(Keyword, Whitespace, Keyword, Whitespace, Keyword, Whitespace, Keyword)),
(r'(option)(\s+)(explicit)', bygroups(Keyword, Whitespace, Keyword)),
- (r'(property)(\s+)(get|let|set)(\s+)([a-z_]\w*)',
+ (r'(property)(\s+)(get|let|set)(\s+)([a-z_][a-z0-9_]*)',
bygroups(Keyword.Declaration, Whitespace, Keyword.Declaration, Whitespace, Name.Property)),
(r'rem\s.*[^\n]*', Comment.Single),
(words(_vbscript_builtins.KEYWORDS, suffix=r'\b'), Keyword),
@@ -549,7 +549,7 @@ class VBScriptLexer(RegexLexer):
(words(_vbscript_builtins.BUILTIN_CONSTANTS, suffix=r'\b'), Name.Constant),
(words(_vbscript_builtins.BUILTIN_FUNCTIONS, suffix=r'\b'), Name.Builtin),
(words(_vbscript_builtins.BUILTIN_VARIABLES, suffix=r'\b'), Name.Builtin),
- (r'[a-z_]\w*', Name),
+ (r'[a-z_][a-z0-9_]*', Name),
(r'\b_\n', Operator),
(words(r'(),.:'), Punctuation),
(r'.+(\n)?', Error)