[Gambas-user] New highlighting component (episode 2)
    Benoît Minisini 
    benoit.minisini at gambas-basic.org
       
    Sun Oct 29 01:41:55 CEST 2023
    
    
  
Le 29/10/2023 à 01:00, Benoît Minisini a écrit :
> Le 29/10/2023 à 00:50, Bruce Steers a écrit :
>>     after is required to be a comment.
>>
>>
>> It is # anywhere in a line starts a comment just NOT if it is inside 
>> {curly braces}
>> i changed
>> from #
>> to be...
>> from /#\s/
>>
>> but it's a workaround as i do not know syntax for # if it's not inside 
>> { }
> 
> What does "#" mean when it is between { and }?
> 
I tried to enhance 'sh' highlighting after having quickly read bash 
documentation.
The bash is cumbersome, so it will never be perfect.
Especially the definition file syntax does not allow implicit recursion, 
i.e. you can't say easily, for example, that inside a double quote 
string you have the same substitution than at top level, without writing 
the commands twice.
But the goal of that definition file is to kept things simple, and make 
the file readable. Not to fully understand its syntax.
If you want to see what I mean, look at the powerful XML highlight 
definition file of Kate and compare. I join it to the mail. 103 Ko 
against 1,5 Ko in Gambas. But it should handle bash syntax correctly (I 
guess).
Regards,
-- 
Benoît Minisini.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bash.xml
Type: text/xml
Size: 103111 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231029/57aa32d1/attachment-0001.xml>
    
    
More information about the User
mailing list