Compiler: "--preprocess" should add comments for includes

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 452
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Compiler: "--preprocess" should add comments for includes

Post by Sicro »

When merging code with includes via the PB compiler with the --preprocess parameter, it would be helpful if the process would add comments that mark which include file it is, where the include code begins and where it ends.

Example:

Main.pb:

Code: Select all

Debug "Main 1"

IncludeFile "Include.pbi"

Debug "Main 2"
Include.pbi:

Code: Select all

Debug "Include 1"
After running

Code: Select all

$ pbcompiler Main.pb --preprocess All.pb
the content of the file All.pb should look like this, for example:

Code: Select all

Debug "Main 1"

; Start of include "Include.pbi"
Debug "Include 1"
; End of include

Debug "Main 2"
Image
Why OpenSource should have a license :: DarkColor-Scheme for PureBasic
PureBasic-CodeArchiv-Rebirth: Git-Repository / Download – Any help is welcome!
Manjaro Xfce x64 (Main system) :: Windows 7 x64 (VirtualBox) :: Newest PureBasic version