Beaglefoot / awk-language-server

Language Server for AWK and associated VSCode client extension
https://marketplace.visualstudio.com/items?itemName=beaglefoot.awk-ide-vscode
MIT License
90 stars 5 forks source link

Multidimensional array index is not recognized #40

Closed 0liv1er closed 1 year ago

0liv1er commented 1 year ago

Given the following test.awk script:

BEGIN {
  array["foo", "bar"] = "hello world"

  print "index [\"foo\"] is" (("foo") in array ? "" : "n't") " part of the array"
  print "index [\"foo\",\"bar\"] is" (("foo", "bar") in array ? "" : "n't") " part of the array"
}

The index ("foo", "bar") provides a Syntax error when editing the script with nvim and the awk-language-server plugin. The index ("foo") doesn't show any error.

Beaglefoot commented 1 year ago

Thanks for reporting! It was an overlook in parser which is now fixed.