[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] arrays: Allow trailing comma
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] arrays: Allow trailing comma |
Date: |
Tue, 25 Feb 2020 08:53:44 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Hi Eric.
If I want to write a program that generates Poke output, it's easier
to generate [1,2,] than it is to generate [1,2] having to special-case
the last element. After all, C99 allows trailing commas in enums to
correct a shortcoming in C89's syntax.
* src/pkl-tab.y (array): Allow trailing comma in arrays.
* doc/poke.texi (Array Literals): Document it.
* testsuite/poke.pkl/arrays-9.pk: New file, to test it.
Nice addition. Pushed to master.
Thanks!