[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Undocumented LPeg behavior with table and group captures and non-string names
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 20 Jul 2015 10:07:00 +0200
2015-07-19 23:40 GMT+02:00 Parke <firstname.lastname@example.org>:
> If a named group capture has a name that is a number (as opposed to a
> string), then when that named group is captured inside a table
> capture, the key used to store the value will be the number converted
> to a string (rather than the number itself).
The second parameter to Cg is retrieved using luaL_checkstring.
This function does number-to-string coercion.
The key is called a "name" in the documentation, which gives
a light hint that its type is expected to be string.