willowtreeapps / wist

A linter for BrightScript
Apache License 2.0
43 stars 11 forks source link

Parse error when using trailing comma on arrays #117

Closed eddiemf closed 5 years ago

eddiemf commented 5 years ago

The following example returns a parsing error because of the trailing comma:

someArray = [
  1,
  2,
  3,
]

Here is the error:

[wist] Parsing error: no viable alternative at input 'subinit()\nsomeArray=[\n1,\n2,\n3,\n]'

The following example runs fine:

someArray = [
  1,
  2,
  3
]
nishtahir commented 5 years ago

@eddiemf Are you using Wist2? I can't seem to reproduce it with the latest version.

eddiemf commented 5 years ago

Actually I just installed vscode-ide-brightscript, I didn't imagine it would use an old version. Also, I tried updating it but it doesn't seem to be working still, probably the plugin is using another version, I'll try to find a way to override it.

Thanks for the help!

nishtahir commented 5 years ago

Yeah the plugin is using an older version of wist - haven't found time to update it. If you or someone is willing to help out - the wist implementation needs to be updated here https://github.com/willowtreeapps/hinoki/ This will then work with the vscode and atom plugins