A pointer to the areas of code involved and any related dependencies would be awesome.
I started an Open Source debugger/logger project as I consider this whole area pretty broken to date. https://www.npmjs.com/package/@genisense/dlog.
I think it could be very useful to the Theia project, once kicked into shape.
Got actual nice human-friendly output & api - a luxury for us neglected devs!:
Early POC is done. Need to replace regx hackary with better parsing approach. hence the quesiton. I also want to know as Theia is the project I want to contribute to more than any other.
[original thread by genisense]
We used to have logging framework built-in, but then removed it to allow control over it for end products. By default we only rely on bar minimum provided by browsers and Node.js capabilities via console. Custom products can use your framework though.
I take the same philosophy of not having logging baked in. Dlog is only for use as a development dependency. I meant it could be useful to the Theia project for demarking code areas for things like walkthroughs, log set sharing related to issues. I digressed, my question really is how does Theia parse code in the IDE?
Do you mean how we construct AST from source code? We don’t do it, we rely on the language server protocol: https://microsoft.github.io/language-server-protocol/, i.e. there is a java server which can accept current document and then gave us answers like what kind of symbols are in the document, what are references, which occurrences should be highlighted. The protocol is agnostic to concrete languages and based on common concept of all languages like document positions and ranges. For syntax coloring we rely on textmate grammars.
So from what I understand, dlog does JS code instrumentation? If so, then I understand why you ask here how Theia parses JS code
Language Servers might seem like an interesting component for your case, but you might have more luck by looking at what Babel or even TypeScript uses, see https://github.com/microsoft/TypeScript/wiki/Using-the-Compiler-API ?