Re: [Lazarus] TP-like nested comment handling

2018-04-03 Thread Florian Klämpfl via Lazarus
Am 03.04.2018 um 15:02 schrieb Mattias Gaertner via Lazarus:
> On Sun, 1 Apr 2018 19:37:13 +0200
> Florian Klaempfl via Lazarus  wrote:
> 
>> I am playing with some old code which assumes TP-like handling of nested
>> comments: i.e. there is only one level of nested comments, the first
>> comment limiter closes a comment. However, Lazarus handles comments like
>> FPC: it counts the nesting level and does syntax highlighting
>> accordingly. Is there any option I am missing so I get correct syntax
>> highlighting for TP-like nested comment handling?
> 
> Here this is highlighted and parsed correctly:
> 
> {$mode tp}> { { }
> begin
> end.
> 
> How do you tell Lazarus that the unit is tp mode?

Well, only in the Project options because I didn't want to modify the source, 
this is why I asked
how to switch the behavior (I found out I can do this by changing the 
highlighter to delphi).

BTW: {$mode iso/extpas} do not change the behavior either, only $mode tp does.
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] TP-like nested comment handling

2018-04-03 Thread Mattias Gaertner via Lazarus
On Sun, 1 Apr 2018 19:37:13 +0200
Florian Klaempfl via Lazarus  wrote:

> I am playing with some old code which assumes TP-like handling of nested
> comments: i.e. there is only one level of nested comments, the first
> comment limiter closes a comment. However, Lazarus handles comments like
> FPC: it counts the nesting level and does syntax highlighting
> accordingly. Is there any option I am missing so I get correct syntax
> highlighting for TP-like nested comment handling?

Here this is highlighted and parsed correctly:

{$mode tp}
{ { } 
begin
end.

How do you tell Lazarus that the unit is tp mode?

Mattias
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TP-like nested comment handling

2018-04-03 Thread Florian Klaempfl via Lazarus
I am playing with some old code which assumes TP-like handling of nested
comments: i.e. there is only one level of nested comments, the first
comment limiter closes a comment. However, Lazarus handles comments like
FPC: it counts the nesting level and does syntax highlighting
accordingly. Is there any option I am missing so I get correct syntax
highlighting for TP-like nested comment handling?
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TP-like nested comment handling

2018-04-03 Thread Florian Klaempfl via Lazarus
I am playing with some old code which assumes TP-like handling of nested
comments: i.e. there is only one level of nested comments, the first
comment limiter closes a comment. However, Lazarus handles comments like
FPC: it counts the nesting level and does syntax highlighting
accordingly. Is there any option I am missing so I get correct syntax
highlighting for TP-like nested comment handling?
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


[Lazarus] TP-like nested comment handling

2018-04-03 Thread Florian Klämpfl via Lazarus
I am playing with some old code which assumes TP-like handling of nested
comments: i.e. there is only one level of nested comments, the first
comment limiter closes a comment. However, Lazarus handles comments like
FPC: it counts the nesting level and does syntax highlighting
accordingly. Is there any option I am missing so I get correct syntax
highlighting for TP-like nested comment handling?
-- 
___
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus