[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: Dmitry Gutov
Subject: Re: trunk r114534: Get Ruby's SMIE code to pass the test suite.
Date: Mon, 21 Oct 2013 10:14:44 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

On 07.10.2013 08:05, Stefan Monnier wrote:
Could you take a look at the examples I added in 114537 and 114538?

See my answer patch.  You'll see that I only added support for - and +.
Other infix operators are easy to add, but I'd rather someone go through
the trouble of finding the precedence table (BTW, you could also use the
trick used in sml-mode, where the infix operators are not specified in
the BNF grammar but only in a precedence table).

Thank you, done, in 114732. Please review when you have the time.

Some further questions:

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

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.

3) Please take a look at the following example:

foo_bar_tee(1, 2, 3)

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.

reply via email to

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