[Lazarus] Q: Compiler features as a service to Lazarus
sysrpl at gmail.com
Tue Nov 24 08:42:31 CET 2015
I have a tangential question related to Sven's new generic features and
thought it deserved its own thread.
Would it be possible to expose the compiler's syntax checking as an engine
to coding environments?
I find it frustrating that with all the great features add to the compiler
(Sven recent generic functions for example) that it takes months or years
for them to be properly supported by CodeTools. (I believe CodeTools
provides its own parser apart from the compiler)
It is very frustrating to try to use a language feature and with the press
of an editor command like Ctrl+Space (for code insight), Ctrl+Shift+C (for
code completion), Ctrl+Shift+Up/Down (navigate interface/implementation) I
am thrown out of whatever I was doing. Then I'm typically confronted with
many CodeTools error complaints, which in fact are not errors, just
language enhancements CodeTools has yet been extended to support.
Wouldn't it be possible, or perchance even preferable, if the compiler was
exposed as a service? Exposed as a service so that coding environments like
the Lazarus IDE (and by extension CodeTools) could use the compilers
services service to advise users what is or is not illegal syntax, as well
as enhanced code insight, code completion, tooltips, and more?
A quick google for "compiler as IDE service" reveals this is not a new idea
in general programming circles:
**This tutorial demonstrates how to use the editor services provided by the
compiler. This API is used to provide auto-complete, tool-tips, parameter
info help, matching of brackets and other functions in editors including
Visual Studio, Xamarin Studio and Emacs.**
If they can do it, why can't we?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lazarus