summaryrefslogtreecommitdiff
path: root/pygments/lexers/qbasic.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/qbasic.py')
-rw-r--r--pygments/lexers/qbasic.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/qbasic.py b/pygments/lexers/qbasic.py
index 3ade3967..f2516941 100644
--- a/pygments/lexers/qbasic.py
+++ b/pygments/lexers/qbasic.py
@@ -91,13 +91,13 @@ class QBasicLexer(RegexLexer):
(r'(?=[^"]*)\'.*$', Comment.Single),
(r'"[^\n\"]*"', String.Double),
(r'END (FUNCTION|IF|SELECT|SUB)', Keyword.Reserved),
- (r'(DECLARE)(\s+)([A-Z]+)(\s+)([^\s]+)',
+ (r'(DECLARE)(\s+)([A-Z]+)(\s+)(\S+)',
bygroups(Keyword.Declaration, Text.Whitespace, Name.Variable,
Text.Whitespace, Name)),
- (r'(DIM)(\s+)(SHARED)(\s+)([^\n\s\t\(]+)',
+ (r'(DIM)(\s+)(SHARED)(\s+)([^\s\(]+)',
bygroups(Keyword.Declaration, Text.Whitespace, Name.Variable,
Text.Whitespace, Name.Variable.Global)),
- (r'(DIM)(\s+)([^\n\s\t\(]+)',
+ (r'(DIM)(\s+)([^\s\(]+)',
bygroups(Keyword.Declaration, Text.Whitespace, Name.Variable.Global)),
(r'^(\s*)([a-zA-Z_]+)(\s*)(\=)',
bygroups(Text.Whitespace, Name.Variable.Global, Text.Whitespace,
@@ -106,7 +106,7 @@ class QBasicLexer(RegexLexer):
bygroups(Keyword.Reserved, Text.Whitespace, Name.Label)),
(r'(SUB)(\s+)(\w+\:?)',
bygroups(Keyword.Reserved, Text.Whitespace, Name.Label)),
- (r'[a-zA-Z_]\w*[\$|@|#|&|!]', Name.Variable.Global),
+ (r'[a-zA-Z_]\w*[\$@#&!]', Name.Variable.Global),
(r'[a-zA-Z_]\w*\:', Name.Label),
(r'\-?\d*\.\d+[@|#]?', Number.Float),
(r'\-?\d+[@|#]', Number.Float),