jeff-hykin / better-shell-syntax

💾 📦 ♻️ An improvement to the shell syntax for VS Code
MIT License
50 stars 4 forks source link

Left shift is being recognized as heredoc #93

Open alexr00 opened 2 weeks ago

alexr00 commented 2 weeks ago

The code with a problem is:

#! /bin/bash

i=$(( 1 + 2))
i=$(( 1 << 2 ))
i=$((1 << 2))
i=$(( 1 + 2 ))
i=$((i<<2))

It looks like:

image

The scopes:

keyword.operator.heredoc.shell
meta.argument.shell
meta.statement.command.shell
meta.statement.shell
meta.parenthese.group.shell
meta.scope.subshell
meta.expression.assignment.shell
source.shell

It should look like:

After the unexpected heredoc scope, the following lines end up with a heredoc scope, when instead they should be colored similarly to line 3.

Originally from @skyp0714 in https://github.com/microsoft/vscode/issues/215908