jonnyboyC / kos-language-server

A language server for the Kerboscript (kOS) a language for Kerbal Space Program
MIT License
25 stars 6 forks source link

Symbol table refactor #89

Closed jonnyboyC closed 5 years ago

jonnyboyC commented 5 years ago

for example this should resolve correctly now

  // main.ks
  runPath("lib.ks").
  global x is 10.
  printX().

  // lib.ks
  function printX {
    print(x). 
  } //    ^--- can now find this x

This pr does appear to reduce the overall performance of the server somewhat as global resolution is now more complicated. A potentially next steps is do some initial graph search of all dependencies / dependents for symbols and have a pre computed lookup from there.

Other points that will need to be address