jeff-hykin / better-shell-syntax

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

String ending single quote is missing a string scope #47

Closed alexr00 closed 1 year ago

alexr00 commented 1 year ago

The code with a problem is:

#!/usr/bin/env bash

declare -A juices=(
    ['apple']='Apple Juice'
    ['orange']='Orange Juice'
)

# This is a comment
echo "${juices['apple']}"

It looks like:

image

It should look like:

The final quote on the line should still have the string.quoted.single scope.

jeff-hykin commented 1 year ago

alright should be fixed.

And @alexr00 idk if I mentioned this, a couple weeks ago I published the original grammar as v0.0.1. So, if for some reason someone wants to go back, they can go all the way back to the original. Hopefully nobody needs it, but it's kind of a bullet proof safety net.