all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: ruby-mide, SMIE and token priority
Date: Thu, 07 Nov 2013 05:18:51 +0200	[thread overview]
Message-ID: <527B069B.6020400@yandex.ru> (raw)

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
}



             reply	other threads:[~2013-11-07  3:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07  3:18 Dmitry Gutov [this message]
2013-11-07  4:30 ` ruby-mide, SMIE and token priority 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=527B069B.6020400@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.