Perl supports providing a command with -e or -E. The latter enables all optional features and it's nice for concise one-liners, but F-Sy-H doesn't recognize it. This PR adds a check for the -E flag and highlights it the same way as -e
Motivation and Context
It adds syntax highlighting for perl -E 'script' style invocation.
Usage examples
-E enables the isa operator. This would result in a syntax error with -e.
perl -E '$a isa $b'
How Has This Been Tested?
Types of changes
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Documentation change
[x] New feature (non-breaking change which adds functionality)
Checklist:
[ ] All new and existing tests passed.
[ ] I have added tests to cover my changes.
[ ] I have updated the documentation accordingly.
It looks like no existing tests cover this scenario but I ran them anyway. I updated the comment at the top to reflect the changes.
Description
Perl supports providing a command with
-e
or-E
. The latter enables all optional features and it's nice for concise one-liners, but F-Sy-H doesn't recognize it. This PR adds a check for the-E
flag and highlights it the same way as-e
Motivation and Context
It adds syntax highlighting for
perl -E 'script'
style invocation.Usage examples
-E
enables theisa
operator. This would result in a syntax error with-e
.How Has This Been Tested?
Types of changes
Checklist:
It looks like no existing tests cover this scenario but I ran them anyway. I updated the comment at the top to reflect the changes.