Lukas Werling
d2c8bacbaa
feat: allow trailing comma in list literal by early break on right bracket
...
Add support for trailing commas in list literals by checking for TOKEN_RIGHT_BRACKET
after parsing the last element in the list() function. When a trailing comma is
followed by the closing bracket, the loop breaks immediately instead of attempting
to parse another element.
Include a test case verifying that lists with trailing commas parse correctly and
elements are accessible by index.
2015-05-30 20:18:37 +00:00
..
2015-07-10 16:18:22 +00:00
2015-07-10 16:18:22 +00:00
2015-08-15 19:07:53 +00:00
2015-07-10 16:18:22 +00:00
2015-03-14 19:45:56 +00:00
2015-07-10 16:18:22 +00:00
2015-07-21 14:24:53 +00:00
2015-07-10 16:18:22 +00:00
2015-07-21 14:24:53 +00:00
2015-07-21 14:24:53 +00:00
2015-03-26 14:17:09 +00:00
2015-07-10 16:18:22 +00:00
2015-03-14 19:45:56 +00:00
2015-07-10 16:18:22 +00:00
2015-08-15 19:07:53 +00:00
2015-07-10 16:18:22 +00:00
2015-05-30 20:18:37 +00:00
2015-03-14 19:45:56 +00:00
2015-05-30 20:17:58 +00:00
2015-07-10 16:18:22 +00:00
2015-03-23 13:48:08 +00:00
2015-07-10 16:18:22 +00:00
2015-03-14 19:45:56 +00:00
2015-08-21 05:04:42 +00:00
2015-07-10 16:18:22 +00:00
2015-07-21 14:24:53 +00:00
2015-03-14 19:45:56 +00:00
2015-07-10 16:18:22 +00:00
2015-03-28 03:44:07 +00:00
2015-07-10 16:18:22 +00:00
2015-07-10 16:18:22 +00:00
2015-07-10 16:18:22 +00:00
2015-07-10 16:18:22 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00
2015-03-14 19:45:56 +00:00