Re: [code] Fixes to Prolog and Logtalk lexers in 10.6

From: Mitchell <m.att.foicica.com>
Date: Wed, 18 Sep 2019 18:45:11 -0400 (EDT)

Hi Michael,

On Thu, 19 Sep 2019, Michael Richter wrote:

> That colours the whole line, including the :-, as lexer.PREPROCESSOR. It's
> not a show-stopper (it's the solution I have in place right now, in fact)
> but it looks a bit ugly.
>
> Is there some trick I could use involving captures maybe?

Sorry, I read one thing you said, but interpreted your provided code in another way. Perhaps you can try:

   lex:add_rule('directive',
     token(lexer.DEFAULT, ':-' * lexer.space^0) *
     token(lexer.PREPROCESSOR, word_match[[foo bar baz]]))

Cheers,
Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Wed 18 Sep 2019 - 18:45:11 EDT

This archive was generated by hypermail 2.2.0 : Thu 19 Sep 2019 - 06:47:50 EDT