bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#21934: 24.5; find-tag: reading TAGS file incorrectly


From: Dmitry Gutov
Subject: bug#21934: 24.5; find-tag: reading TAGS file incorrectly
Date: Sun, 22 Nov 2015 16:33:09 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0

On 11/22/2015 04:08 PM, Andreas Matthias wrote:

In the example given Rectangle is a data structure called table and a
table is an associative array. In Lua you can put variables and
functions into a table. So Rectangle.getPos() is the function getPos()
of table Rectangle.

So I think what you're saying is lua-mode should add "." to the syntax-class "symbol". However:

Though Lua does not know the concept of classes, it
is easy to model object-oriented behavior by means of tables.

In addition to the dot-operator there's also a colon-operator in Lua which
acts like the dot-operator but hides the self/this parameter of OOP.

Is it usual that, when defining classes that way, you *will* define methods using the dot notation, and then later use them with an "instance variable", using the colon notation? Like in this article:

http://www.lua.org/pil/16.html

You define the method with "function Account.withdraw (self, v)",
and then use it in "a1.withdraw(a1, 100.00)".

It seems that etags should at least output two tag names for this declaration: both "Account.withdraw" and just "withdraw".





reply via email to

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