March 16
On Wednesday, 13 March 2019 at 23:32:13 UTC, Rubn wrote:
> Using the actual DMD compiler may not be that great as a language server.
>
> https://code.visualstudio.com/api/language-extensions/language-server-extension-guide#error-tolerant-parser-for-language-server
>
> https://github.com/Microsoft/tolerant-php-parser/blob/master/docs/HowItWorks.md

Similar concept, used in Atom's last release for C++ and JS parsing:

https://tree-sitter.github.io/tree-sitter/
March 16
On Saturday, 16 March 2019 at 15:24:00 UTC, Jacob Carlborg wrote:
> On 2019-03-14 23:34, Rubn wrote:
>
>> Which part? Point is using DMD as a language server isn't going to be intuitive, compilers are designed to fail on invalid input but editors need to work for incomplete source files.
>
> Then DMD needs to be changed to handle incomplete source files. I'm no expert on this topic but wouldn't it be enough if the lexer and parser can handle incomplete source files? That might be feasible to complete during a summer.

No it shouldn't, it's a compiler it should compile. Trying to shoehorn in features so it makes for a better library to be used as a language server will just make it a worse compiler.

>> Thinking that most of the work is done because they can use DMD is just backwards and haven't ever written tooling tools.
>
> Yes. There's no magic to use DMD as a library. Just compile all the necessary files and create a library out of the object files. It's been possible to do this for as long as DMD has existed. We just created a Dub package and some utility functions to package it nicely.

I wasn't talking about how difficult it is to compile DMD..

March 24
On Saturday, 16 March 2019 at 15:24:00 UTC, Jacob Carlborg wrote:
> On 2019-03-14 23:34, Rubn wrote:
>
>> Which part? Point is using DMD as a language server isn't going to be intuitive, compilers are designed to fail on invalid input but editors need to work for incomplete source files.
>
> Then DMD needs to be changed to handle incomplete source files. I'm no expert on this topic but wouldn't it be enough if the lexer and parser can handle incomplete source files? That might be feasible to complete during a summer.
>
>> Either way I feel this is out of scope for a single student to complete in a single summer.
>
> I'm thinking it's very ambitious too.
>
>> Thinking that most of the work is done because they can use DMD is just backwards and haven't ever written tooling tools.
>
> Yes. There's no magic to use DMD as a library. Just compile all the necessary files and create a library out of the object files. It's been possible to do this for as long as DMD has existed. We just created a Dub package and some utility functions to package it nicely.

This can be helpful ->

Source :- https://stackoverflow.com/questions/3061654/what-is-the-difference-between-javac-and-the-eclipse-compiler


Eclipse has implemented its own compiler called as Eclipse Compiler for Java (ECJ).

It is different from the javac, the compiler that is shipped with Sun JDK. One notable difference is that the Eclipse compiler lets you run code that didn't actually properly compile. If the block of code with the error is never ran, your program will run fine. Otherwise, it will throw an exception indicating that you tried to run code that doesn't compile.

Another difference is that the Eclipse compiler allows for incremental builds from within the Eclipse IDE, that is, all code is compiled as soon as you finish typing.

The fact that Eclipse comes with its own compiler is also apparent because you can write, compile, and run Java code in Eclipse without even installing the Java SDK.

Next ›   Last »
1 2