AutoComplete - Including expanded Macros

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
IndigoFuzz

AutoComplete - Including expanded Macros

Post by IndigoFuzz »

A lot of code libraries are being made at the moment (OOP for example) where Macros are heavily used to generate Interfaces and so on...

It would be very very very very (x1000) nice if Autocomplete could take the expanded macros into consideration so that the code that will be generated will be parsed and included.

Thanks :)
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: AutoComplete - Including expanded Macros

Post by Dude »

To do that, you'd need your entire source to be constantly compiled while editing it. :shock: I doubt that will happen.
IndigoFuzz

Re: AutoComplete - Including expanded Macros

Post by IndigoFuzz »

Dude wrote:To do that, you'd need your entire source to be constantly compiled while editing it. :shock: I doubt that will happen.
Well not really.. a feature to the current source parser could be added which does the macro expansion and just examines the resulting code for the same tokens as the current parser does

A complete overhaul would actually be nicer which responds just like most other IDEs where it's relevant to include files rather than just open files in the IDE, but I can imagine that'd be an even bigger task
Cyllceaux
Enthusiast
Enthusiast
Posts: 510
Joined: Mon Jun 23, 2014 1:18 pm

Re: AutoComplete - Including expanded Macros

Post by Cyllceaux »

+1
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: AutoComplete - Including expanded Macros

Post by Dude »

Bad description by myself: I didn't mean completely compiled, but rather syntatically (?) compiled as you edit. It's a big task, anyway.
IndigoFuzz

Re: AutoComplete - Including expanded Macros

Post by IndigoFuzz »

Dude wrote:Bad description by myself: I didn't mean completely compiled, but rather syntatically (?) compiled as you edit. It's a big task, either way.
Of course, so I would suggest waiting for an Idle period to parse the code.. so for example, if no keystrokes detected for 2 seconds (when the dev takes a much needed coffee-refill break or rests their fingers) it can parse the file(s) that have been edited since last parse, with the cached results of the other files
User avatar
NicTheQuick
Addict
Addict
Posts: 1504
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: AutoComplete - Including expanded Macros

Post by NicTheQuick »

This would be very nice. When programming Python in eclipse the IDE is parsing the code all the time and also underlines syntax errors when they occur and not when I compile. Of course there is more CPU power needed but not that much that you wouldn't be able to use the IDE normally.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
RSBasic
Moderator
Moderator
Posts: 1228
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: AutoComplete - Including expanded Macros

Post by RSBasic »

+1
Image
Image
Post Reply