IDE + Tools + StopCompile

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
CSHW89
User
User
Posts: 30
Joined: Thu Sep 09, 2010 2:47 pm

IDE + Tools + StopCompile

Post by CSHW89 »

Hi,
i'm currently writing a precompiler. If it found an error in a sourcecode and it ended with an exitcode <> 0, it would be useful if the IDE doesn't compile the sourcecode. e.g:

My Precompiler:

Code: Select all

;...
Procedure CheckCode(file.s)
  ;...
  If (error)
    MessageRequester("MyPrecompiler", "Syntax error")
    End 1 ; says the IDE, it shouldn't compile
  EndIf
EndProcedure
;...
lg Kevin
Image Image Image
User avatar
Danilo
Addict
Addict
Posts: 3036
Joined: Sat Apr 26, 2003 8:26 am
Location: Planet Earth

Re: IDE + Tools + StopCompile

Post by Danilo »

CSHW89 wrote:Hi,
i'm currently writing a precompiler. If it found an error in a sourcecode and it ended with an exitcode <> 0, it would be useful if the IDE doesn't compile the sourcecode. e.g:
This has been requested before, can't find the topic now.

Yes, it would be useful. For now, you can output the following file to the compiler (instead the real preprocessed file):

Code: Select all

CompilerError("your own error message")
Post Reply