lua-users home
lua-l archive

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



I fully agree. LuaSub has '-snokw' (no keywords - in table indices) for exactly this.

This is especially vital for the enhanced 'assert' and 'type' libs that allow:

	assert.function( val )
	assert.true( val )
or
	type.function( val )

-asko


Hans Hagen kirjoitti 20.2.2008 kello 16:26:

Hi,

	t = {}
	t.repeat = "x"

this gives

	'<name>' expected near 'repeat'

i can imagine some limitations like assigments, say

	repeat = 'x'

but since the reference states that

	a.name as syntactic sugar for a["name"]

i'd expect the parser to recognize such cases; isn't this tricky with repect to future extensions (read: new keywords) being used in scripts as keys already?

Hans




-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
-----------------------------------------------------------------