Re: [code] [textadept] Improvements to C and Rust lexers

From: Gabriel Bertilson <>
Date: Fri, 20 Sep 2019 15:31:01 -0500

> But here's a version that uses lookbehind.

Whoops, lexer.starts_line also uses lookbehind. My new function ended
up being very similar. The practical difference is that it skips over
any spaces or tabs when looking for a newline before the pattern.

I already noticed an error: the pattern '%f[^\n\0][ \t]+$' should be
'%f[^\0\n\r\f][ \t]+$'. (The \0 for "start of string" also isn't a
great idea because there could be null characters in the file.)

You are subscribed to
To change subscription settings, send an e-mail to
To unsubscribe, send an e-mail to
Received on Fri 20 Sep 2019 - 16:31:01 EDT

This archive was generated by hypermail 2.2.0 : Sat 21 Sep 2019 - 06:49:15 EDT