-
Notifications
You must be signed in to change notification settings - Fork 747
Closed
Description
The following Tcl code prints 10x10:
set size 10; puts ${size}x${size}Pygments emits Token.Error tokens for each $ here, even though it's valid and working code:
>>> from pygments.lexers import TclLexer
>>> for t in TclLexer().get_tokens_unprocessed('set size 10; puts ${size}x${size}'):
... print(t)
...
(0, Token.Keyword, 'set')
(3, Token.Text.Whitespace, ' ')
(4, Token.Text, 'size')
(8, Token.Text.Whitespace, ' ')
(9, Token.Literal.Number.Integer, '10')
(11, Token.Keyword, ';')
(12, Token.Text.Whitespace, ' ')
(13, Token.Name.Builtin, 'puts')
(17, Token.Text.Whitespace, ' ')
(18, Token.Error, '$')
(19, Token.Keyword, '{')
(20, Token.Name.Variable, 'size')
(24, Token.Keyword, '}')
(25, Token.Text, 'x')
(26, Token.Error, '$')
(27, Token.Keyword, '{')
(28, Token.Name.Variable, 'size')
(32, Token.Keyword, '}')Metadata
Metadata
Assignees
Labels
No labels