That makes sense.  Rust is an easier language to parse then C/C++ though, so 
maybe it isn’t necessary.  Just need to convert the source in to an AST with an 
alternate parser that can throw out stuff that is invalid.  Then analyze it 
with the compiler.

Eric

On Mar 12, 2014, at 3:07 PM, Daniel Micay <danielmi...@gmail.com> wrote:

> On 12/03/14 03:52 PM, Clark Gaebel wrote:
>> 
>>    ​There is no accurate jump-to-definition, type retrieval, docstring
>>    retrieval or semantic completion for Rust. The compiler was not built
>>    with support for this kind of tooling in mind, and I seriously doubt
>>    that anything but inaccurate hacks will exist for a *long* time.​
>> 
>> 
>> ​This worries me a lot.
> 
> It would need to be able to perform type checking/inference even if the
> file can't be fully parsed, or there are type errors in other places.
> 
> At the moment, each phase simply assumes all of the previous stages were
> fully completed, and it bails out immediately on any error by unwinding
> via failure.
> 
> It's easy to see this from the error reporting. Rust can report multiple
> errors within the same phase, but it's unable to report a type error if
> parsing fails. `clang` was designed with this kind of thing as a central
> pillar and is able to continue reporting errors or giving useful results
> to queries from tooling even if there are problems.
> 
> It's not at all an easy task, and most compilers are not able to do it.
> A language like Go is simple enough that tooling like completion can be
> done without help from a compiler. However, Rust has powerful local type
> inference, which presents a difficult obstacle. Another enormous
> obstacle is the power of traits - a type can have methods provided by
> traits, if the trait is in scope and the type is covered by an
> implementation, which may be generic.
> 
> _______________________________________________
> Rust-dev mailing list
> Rust-dev@mozilla.org
> https://mail.mozilla.org/listinfo/rust-dev

_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to