'AppleScript debug with shellcheck

I am a complete novice using Script Editor. I don't even know what language this is written in, but I'm trying to use shellcheck.net to debug this:

var=value LDMIcon to path to resource "LDM_Icon.icns" in bundle (path to me)
set CurrentOS to do shell script "sw_vers -productVersion | cut -c 1-4"

shellcheck says this;

var=value LDMIcon to path to resource "LDM_Icon.icns" in bundle (path to me)
>>                                                              ^-- SC1036 (error): '(' is invalid here. Did you forget to escape it?
>>                                                              ^-- SC1088 (error): Parsing stopped here. Invalid use of parentheses?

I've tried to fix it using the github tips (SC1036 etc) with no luck. Can anyone help?

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source