[Top][All Lists]

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

bug#22241: 25.0.50; etags Ruby parser problems

From: Dmitry Gutov
Subject: bug#22241: 25.0.50; etags Ruby parser problems
Date: Mon, 1 Feb 2016 11:40:46 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Thunderbird/44.0

On 01/31/2016 09:11 PM, Eli Zaretskii wrote:

Ah, so it _is_ important.

It kind of is. But I can open a separate bug for it, if you want.

But then I'd need a complete specification
of what is needed.  (And I already smell a tip of an iceberg.)  Again,
the references are scarce and incomplete, but I already understand
that it could be either of the following

   attr_WHATEVER :foo
   SOMETHING ; attr_WHATEVER :foo ; ...
   attr_WHATEVER :foo, :bar; ...

Is that true?  Are there any other forms, or can the symbol be
followed only by a comma, a semi-colon, or whitespece?

The newline might also be preceded by a comment, I suppose.

But really, if recognizing attr_WHATEVER when it's just one of the instructions on a line presents a noticeable difficulty, you can disregard that case: nobody really does that in practice. Or we can disregard it at least until somebody complains.

So you would handle

attr_WHATEVER :foo, :bar # comment

and probably

attr_WHATEVER :bar;

(the semicolon is redundant, but hey, it shouldn't be too hard to support)

and the most difficult realistic case I can imagine looks like this:

attr_WHATEVER :foo, :bar, # comment
              :qux, :tee

And what ends
a line like that -- a newline, or can it be continued on the next

If there's a comma at the end of the current line, the argument list continues on the next one.

Couldn't find it.  And it isn't important enough to argue, just tell
which file-name extensions to consider Ruby and I will do it.

Let's go with my original suggestions, then:

.rb .ru .rbw Rakefile Thorfile


reply via email to

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