[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: trunk r114534: Get Ruby's SMIE code to pass the test suite.

From: Stefan Monnier
Subject: Re: trunk r114534: Get Ruby's SMIE code to pass the test suite.
Date: Mon, 21 Oct 2013 08:46:19 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> 1) Is `assoc' any different from `left' in practice?

Yes: with `assoc', when you have "a + b + c", smie first tries to align
"c" with "b", whereas with `left' it would skip "b" and go straight to
"a".  When there are only 3 elements, it rarely makes a difference, but
for things like "," or ";" where there can be tens or hundreds of
elements, the different can be very significant in terms of
indentation speed.  Also, it makes a difference if the user purposefully
"misindents" some of the elements, of course.

> 2) `ruby-smie-grammar' has a FIXME at the top. What kind of Cucumber support
> do you suppose is missing? The "Given /toto/ do" example in ruby.rb looks
> fine, mostly due to the syntax-propertize-function, which hasn't changed.

That fixme migth be out of date, indeed.

> 3) Please take a look at the following example:
> foo_bar_tee(1, 2, 3)
>   .qux
> What would be the best way to make it work (and also similar example with
> the dot on the first line)?
> Add another two cases to `ruby-smie-rules', for the token "."? That wouldn't
> exactly, I think, work because `ruby-smie--forward-token' and its
> counterpart like to concatenate the dot with the identifier that goes
> after it.

Maybe change the tokenizer so that a ".qux" *at smie-bolp* is tokenized
as "." and "qux"?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]