Re: [GSoC][PATCH v3] Add a diff driver for JavaScript languages.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 4, 2022, 21:44 UTC
- Message-ID
- <xmqqee2c34n8.fsf@gitster.g>
- In-Reply-To
- <660d068f-1c8c-7057-0a92-5100791daf80@kdbg.org>
Johannes Sixt <j6t@kdbg.org> writes:
Show 11 quoted lines
> Am 04.04.22 um 09:12 schrieb Ævar Arnfjörð Bjarmason: >> While we don't use helper macros for these currently there's no reason >> we can't, I thin the above might be more readable with e.g.: >> >> #define JS_AA "[$_[:alpha:]][$_[:alnum:]]" > > Please consider including "identifier" somehow in the macro name. And > add the trailing '*', which... > > ... which makes me wonder why it is not present here. If that's an > oversight: nice catch!
Yeah, and taken together with the locale worry, we shouldn't play cute and use :alpha: and :alnum:, but spell them out, i.e.
#define JS_IDENT "[$_a-zA-Z][$_a-zA-Z0-9]"
probably.