Re: [code] lexer for indentation driven blocks

From: Carl Sturtivant <sturtivant.att.gmail.com>
Date: Tue, 23 Feb 2016 22:26:14 -0600

Hello Mitchell,

On 2/22/2016 7:52 PM, Mitchell wrote:
> It looks like you'll need a start rule that matches some level of
> beginning whitespace and stores lexer state (that probably includes the
> level of indentation at a minimum), and an end rule that checks for the
> desired level of indentation before matching. This is just an idea
> though, I'm not positive it will work in practice.

This technique works whenever a tab containing the file it brought to
the front, or whenever a file is opened. But not during editing. Also,
it seems that moving between two diet template tabs causes their lexing
to interfere with each other, as if they are sharing the saved state
used by this technique. All of this despite my hiding that inside a
closure for each language.

The main problem seems to be that a lexer is only passed the whole
document when the whole page needs lexing. I am unclear just what is
passed to the lexer as editing continues.

Any information appreciated.

Carl.

-- 
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 Tue 23 Feb 2016 - 23:26:14 EST

This archive was generated by hypermail 2.2.0 : Wed 24 Feb 2016 - 06:43:56 EST