Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign

Codecompletion for D

(1/5) > >>

nocide:
I tinkered with the idea to implement codecompletion for D.
Since the current completionsupport is only based on the analogy of D to C.
I think there would be 3 possibilities to implement this.

a) Implement it in the same Parser-classes as cpp
b) Implement in the same codecompletion plugin, but with it's own parser-framwork
c) completly independent plugin for D-Parser

re a) I think this would be not a good idea. Specifically when we want implement more languages, this will become a nighmare of if/else blocks
re b) I have seen, that cpp-related code is not only in the parser-subfolder, but also in the main-folder of this plugin. But this would probably be the easiest way to go.
re c) IMHO this would be the cleanest implementation. But for now, I have no clue how this can be loaded or managed in parallel with the cpp-codecompletion plugin.

So what are your thoughts?

ollydbg:

--- Code: ---re b) I have seen, that cpp-related code is not only in the parser-subfolder, but also in the main-folder of this plugin. But this would probably be the easiest way to go.
--- End code ---

Sorry, I have never used D language.

But I have some kind of familiar with the current CC plug-in's code. :D

There are two major parts of CC, the first part (we say part A) was collecting tags. we use the parser class and other helper classes(all the code was under parser- subfolder as you said) to analyze all the source code, then we store all the tags(some times, we call Tokens).

The second part( we say Part B) was doing the completion and other UI tips( eg, when the mouse hover on some ids, there is a function tip or when you enter some text, then there is a completion list prompt below your caret), it need to resolve the current code statement syntax.

Currently CC's code is quite mixing. So, if you want to implement a D language, you need to implement a part A for D language, and only modify some code in Part B.

nocide:
Ah I see, that makes now more sense to me.

So I make a DParser class with the same interface as Parser, and we can load the correct parser related to the opened file/project?

oBFusCATed:
The best thing will be to extract part B and put it in the cb's sdk... but I suppose this will be tough...

JGM:
whoa I have been throwing an eye to D language and there are no IDE for it as I now that supports CC would be of great help since D seems to come after C and the future will change got it? A B C D  :lol:

Also I have read that D is easier to parse!

Navigation

[0] Message Index

[#] Next page

Go to full version