Closed IAKOBVS closed 11 months ago
Are the values of the enums in PerlSymbolKind used externally? If not, we should remove the values or use numbers since a C compiler can optimize lookup of a switch statement with continuous values to be O(1).
Yes, these values are also specified in Inquisitor.pm. When the Navigator runs perl -c
on an open file, it also runs the Inquisitor in the same process which inspects the symbol tables and prints out elements. It mostly looks for imported symbols like imported packages, subs, methods, and variables. You can see the format if you run this from the main directory.
perl -c -I server/src/perl -MInquisitor testWorkspace/mainTest.pl
Essentially, parser.ts
primarily parses the "current" file, while the Perl compiler is what parses all loaded dependencies.
Looks good to me, thanks again for the contributions! I'll merge some other stuff in today, and I'll try to format the files as I go.
I made a couple small touchups after the fact. There was an off-by-one issue in completion ($foo vs foo). Also, I continued adding to the subroutine signatures, and I needed to add some new code to close the call signatures when )
is reached. Thanks!
Are the values of the enums in PerlSymbolKind used externally? If not, we should remove the values or use numbers since a C compiler can optimize lookup of a switch statement with continuous values to be O(1).