lua-users home
lua-l archive

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


On Mon, May 16, 2016 at 3:34 PM, Jonne Ransijn <yoyoyonny@gmail.com> wrote:

I don't really like the 1'000'000 syntax,
because I would personally rather be able to add syntax to call a function

print(con 'Hello, ' 7)
print(con3 1 '000' 000) -- con3(1000000) or con3(1)('000')(000)?

I implied only single quote to be a separator, not a space.
So, 1 '000' 000 would be three lexems: a number, a string and a number.
I also implied to place separator only between two digits.
So, '123 or '000' or 1''2 or 1.'5 or -'1 would not be considered as number literals.

I hope you don't want to put lexems without separating by a space:
con3 1'000'000
and interpret it as
con3 (1)('000')(000)