-
Notifications
You must be signed in to change notification settings - Fork 26
Description
From @AlexTalker in microsoft/vscode#81309
- VSCode Version: 1.38.1
- OS Version: Windows_NT x64 10.0.17763
Steps to Reproduce:
- Create a perl module like this:
use v5.10;
use strict;
use warning;
use constant FOO => 42;
my $x = 33;
$x = $x << FOO;
say($x);
Does this issue occur when all extensions are disabled?: Yes
The problem seems to be that this regular expression https://github.com/textmate/perl.tmbundle/blob/master/Syntaxes/Perl.plist#L2080 breaks rules of Perl syntax:
The terminating string may be either an identifier (a word), or some quoted text. An unquoted identifier works like double quotes. There may not be a space between the << and the identifier, unless the identifier is explicitly quoted. The terminating string must appear by itself (unquoted and with no surrounding white-space) on the terminating line.
https://perldoc.perl.org/perlop.html#Quote-and-Quote-like-Operators
As it consumes a white-spaces successfully.
I don't know who's to blame here, so I make the issue here and you can if necessary duplicate it to TextMate project.
On huge projects, it is really annoying to break syntax of a large file by simple usage of a constant.
