Andersbakken / rtags

A client/server indexer for c/c++/objc[++] with integration for Emacs based on clang.
http://www.rtags.net
GNU General Public License v3.0
1.82k stars 253 forks source link

When tab characters appear in source code, make output from -F and -R easier to parse #1419

Open nrnrnr opened 2 years ago

nrnrnr commented 2 years ago

Related problem

I am using rtags to build an identifier cross-reference for literate C code. Output from rc -N -F --display-name --containing function --cursor-kind is positional, and the -N is necessary lest tabs in the source code confuse my parser.

The solution I'd like

I'd like the --json option to work with -F.

Alternatives I've considered

I'd also be delighted to have rc dump everything that the server knows about symbols, as a JSON object. That would also eliminate the tiresome necessity to query each symbol individually with its own -R option (to find uses).

Other reasonable options would be to escape tab characters that appear in source code.

Additional context

For what it's worth, I am querying every symbol in a program.