Evergreen and ruby's flexible quoting (1719/3257/1.6.0_13-b03/Linux 2.6.35.13-weta-20110808/amd64 x2)

15 views
Skip to first unread message

Chris Reece

unread,
Oct 4, 2011, 6:19:30 PM10/4/11
to evergre...@googlegroups.com
See attached image. Evergreen shows cunfused syntax highlighting and
auto-indentation when it encounters flexible quotes using %{}.

Cheers,

Chris.

evergreen_indent.png

Elliott Hughes

unread,
Oct 4, 2011, 6:53:58 PM10/4/11
to evergre...@googlegroups.com
this will be harder to fix. the PAbstractLanguageStyler isQuote method
would need to be more sophisticated, so you give it a CharSequence and
an index and ask "does a quote start here?", and you'll also need it
to give you either "and here's what you're looking for to recognize
the end" or "and here's the end index".

alternatively, you could try to add more hacks to PRubyTextStyler
along the lines of the one for regular expression literals. (see
initStyleApplicators.)

> --
> You received this message because you are subscribed to the Google Groups "evergreen-users" group.
> To post to this group, send email to evergre...@googlegroups.com.
> To unsubscribe from this group, send email to evergreen-use...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/evergreen-users?hl=en.
>
>

--
Elliott Hughes - http://www.jessies.org/~enh/

Chris Reece

unread,
Oct 4, 2011, 7:27:13 PM10/4/11
to evergre...@googlegroups.com, evergre...@googlegroups.com
> alternatively, you could try to add more hacks to PRubyTextStyler
> along the lines of the one for regular expression literals. (see
> initStyleApplicators.)

Yeah, I saw that as I was digging around for the symbol-highlighting thing.
To an humble sysadmin, that looks bloody horrendous.

I'll put that one on my TO DO pile.

Neither of these are show-stopper, obviously -- I just thought I'd mention them.

Cheers,

Chris.

Elliott Hughes

unread,
Oct 4, 2011, 7:47:19 PM10/4/11
to evergre...@googlegroups.com
On Tue, Oct 4, 2011 at 16:27, Chris Reece <c...@jessies.org> wrote:
>> alternatively, you could try to add more hacks to PRubyTextStyler
>> along the lines of the one for regular expression literals. (see
>> initStyleApplicators.)
>
> Yeah, I saw that as I was digging around for the symbol-highlighting thing.
> To an humble sysadmin, that looks bloody horrendous.

fwiw, i don't like it either. there have been several times i've got
as far as that code and then stopped because i wasn't _that_ bothered.

> I'll put that one on my TO DO pile.
>
> Neither of these are show-stopper, obviously -- I just thought I'd mention them.
>
> Cheers,
>
> Chris.
>

Reply all
Reply to author
Forward
0 new messages