unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ruby-mide, SMIE and token priority
@ 2013-11-07  3:18 Dmitry Gutov
  2013-11-07  4:30 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2013-11-07  3:18 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan,

There's one example in indent/ruby.rb I don't know what to do about:

bar.foo(tee) do
   bar
end

The problem seems to be that "." is considered the parent token of "do". 
Probably because the left priority of "do" is not a number.

It would be more natural if the parent of "do" was ";" on the preceding 
line, instead. Is it at all possible to change the grammar this way?

Or should we just handle this as a special case in the 
`ruby-smie-rules', and in case of "do", instead of delegating to the 
parent, skip the parents until we find ";"?

P.S. And here's a similar example with a curly block:

bar.foo(tee) {
   bar
}



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-11 17:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07  3:18 ruby-mide, SMIE and token priority Dmitry Gutov
2013-11-07  4:30 ` Stefan Monnier
2013-11-07 13:10   ` Dmitry Gutov
2013-11-07 16:02     ` Stefan Monnier
2013-11-11  9:14       ` Bozhidar Batsov
2013-11-11 12:56         ` Dmitry Gutov
2013-11-11 15:13           ` Bozhidar Batsov
2013-11-11 17:19             ` Dmitry Gutov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).