[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Lua grammar question
- From: Slavomir Kaslev <slavomir.kaslev@...>
- Date: Thu, 25 Mar 2010 18:10:01 +0200
Hello,
Recently I stumbled upon that `print({}[1])` fails to parse with "')'
expected near '['". However `print(({})[1])` parses without problem.
I checked Lua's grammar and found out that this is the expected
behavior and not a bug in Lua's parser.
Is there a reason for this? Would allowing expressions like
`{foo}[bar]` overcomplicate Lua's grammar and parsing?
Kind regards,
--
Slavomir Kaslev