[Lazarus] Prevent CodeTools from parsing a piece of code
Sven Barth
pascaldragon at googlemail.com
Fri Nov 21 08:58:11 CET 2014
Am 21.11.2014 02:21 schrieb "Maxim Ganetsky" <ganmax at narod.ru>:
>
> 21.11.2014 1:41, Mattias Gaertner пишет:
>
>> On Thu, 20 Nov 2014 17:16:40 +0100
>> Sven Barth <pascaldragon at googlemail.com> wrote:
>>
>>> Hello together!
>>>
>>> Is there a possibility to prevent the CodeTools from parsing a piece of
>>> code while allowing the compiler to parse it? For example some define
>>> that's only set for CodeTools, but not for the compiler?
>>> This would be really useful for people like me who either work on New
>>> compiler features or use newer features in stable (aka older) versions
of
>>> the IDE. :)
>>
>>
>> Tools / Codetools Defines Editor
>> Edit / Insert Node Below / Define Recurse
>>
>> Name: InLazIDE
>> Description: Define InLazIDE everywhere
>> Variable: InLazIDE
>> Value: 1
>>
>> Then you can use anywhere:
>> {$IFDEF InLazIDE}
>> only valid in Lazarus source editor
>> {$ENDIF}
>
>
> But this won't prevent CodeTools from parsing this code? Maybe we need
some {% ...} Codetools enable/disable directive?
It works exactly as intended if one uses IFNDEF. And this way it can be
used to let the IDE parse a non compiling, but parseable alternative. :)
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20141121/b325b345/attachment-0003.html>
More information about the Lazarus
mailing list