Re: [code] [scintillua] Match patterns between embedded lexer start/end?

From: Claire Lewis <claire_lewis.att.live.com.au>
Date: Thu, 10 Oct 2013 14:49:04 +1030

> I'm not exactly sure if I understand the concern you raised, but the
> patch's `package.loaded[lexer_name] = nil` should force `require()` to
> look up the lexer, even if one of the "same name" was previously loaded.

Ah yes, sorry I misread what was going on there... I had thought that the
require was going to return the same module table both times, but the
explicit removal fixes that.

>> In fact, I'm not even sure the _NAME is set unless there's an error with
>> require.
> You are correct, I forgot to add a line. New patch attached.
>
> I've also attached a sample lexer I threw together in 5 minutes and tested
> it with some simple ffi declarations and it seems to work. Asking for the
> whitespace style names in each declaration gives the "cpp" and "cpp2"
> names, so the styling works wherever I start typing in the file.

Excellent! With the extra line my lexer started working too. I'll let you
know if I see any issues, but it looks good enough to go in, to me.

Very nice, thankyou!

Thanks,
- Claire

-- 
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 Thu 10 Oct 2013 - 00:19:04 EDT

This archive was generated by hypermail 2.2.0 : Thu 10 Oct 2013 - 06:37:27 EDT