-
Notifications
You must be signed in to change notification settings - Fork 783
Closed
Labels
A-lexingarea: changes to individual lexersarea: changes to individual lexersT-bugtype: a bugtype: a bug
Description
I've noticed something the AutoIT parser gets wrong. The following line of AutoIT code
$foo = 'bar; baz'
will get tokenized as
[(Token.Name.Variable, '$foo'),
(Token.Text, ' '),
(Token.Operator, '='),
(Token.Text, ' '),
(Token.Text, "'"),
(Token.Name, 'bar'),
(Token.Comment.Single, "; baz'\n")]
The correct tokenization should be
[(Token.Name.Variable, '$foo'),
(Token.Text, ' '),
(Token.Operator, '='),
(Token.Text, ' '),
(Token.Literal.String, '"'),
(Token.Literal.String, 'bar; baz'),
(Token.Literal.String, '"'),
(Token.Text, '\n')]
I noticed the tokenization is done correctly if the string is enclosed in double quotes rather than single quotes, but both should be valid autoit syntax
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-lexingarea: changes to individual lexersarea: changes to individual lexersT-bugtype: a bugtype: a bug