GNU bug report logs -
#21934
24.5; find-tag: reading TAGS file incorrectly
Previous Next
Full log
View this message in rfc822 format
Dmitry Gutov wrote:
> 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:
I'm sorry, I'm not familiar with emacs internals like the syntax table.
>> 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)".
Tables are the main data structure of Lua. Although the dot operator
can be used in the sense of OOP, more often than not the dot operator
is just used to access elements of a table.
> It seems that etags should at least output two tag names for this declaration:
> both "Account.withdraw" and just "withdraw".
Maybe. But how do you handle getPos() from the example which exists
twice, once in table Rectangle and once in table Circle?
This bug report was last modified 9 years and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.