we can put what we have into a table and use sqlite for everything else :)
file(id,filepath) // some id for every source file
symbol_location(symbol, file_id, line,col,offset) // where symbol is declared
SELECT file_id,line,col,offset FROM symbol_location WHERE symbol=? // get location by symbol
basically, for all *.(s|d)ats files in a directory, run the taggen tool and add up all results to a TAGS file
JSON over simple TCP
single line of json input, ended by a newline
then it gives back a response again with a single line, terminated by a newline
and closes the connection
https://docs.google.com/document/d/10nItDoBFchCblgk6BglcbMrv7qDHOymbfu8j_C8RFNU/edit
learn how to use it!
or, make a better tool out of that. seriously.
--taggen
outputs JSON for a given sats or a dats filewhere X =
{"name": "name-of-the-symbol", "nline": 1, "nchar": 1}
https://github.com/alex-ren/org.ats-lang.toolats/tree/master/org.ats-lang.toolats/src/org/ats_lang/toolats/taggen
converts this JSON to something palatable
actually.
a tool to do queries over the symbols
we can put what we have into a table and use sqlite for everything else :)
basically, for all *.(s|d)ats files in a directory, run the taggen tool and add up all results to a TAGS file
https://www.emacswiki.org/emacs/TagsFile#tags_file
we could also start with a TCP server that follows something similar to the purescript IDE protocol: https://github.com/purescript/purescript/blob/master/psc-ide/PROTOCOL.md
example servers:
I guess we could even use the compiler as a library and embed it into this server