Re: [PATCH v4] userdiff: add builtin diff driver for Kotlin language.
- From
Johannes Sixt <j6t@kdbg.org>
- Date
- Mar 5, 2022, 22:17 UTC
- Message-ID
- <bee0dba1-e01c-4a2b-6a46-79361bfb3459@kdbg.org>
- In-Reply-To
- <6481bd49-eac9-9ebe-3d19-866107378f81@gmail.com>
Am 05.03.22 um 20:18 schrieb jaydeepjd.8914@gmail.com:
> Maybe we could just use cpp's regex for floating numbers starting with > decimal point: > > "|\\.[0-9][0-9]*([Ee][-+]?[0-9]+)?[fFlL]?"
Yes, but with '_' permitted after the first digit:
"|\\.[0-9][0-9_]*([Ee][-+]?[0-9]+)?[fFlL]?"
Show 6 quoted lines
> > Or maybe, we can make the current regex for floats and integers a bit > more loose: > > "|[0-9.][0-9_.]*([Ee][*-]?[0-9]+)?[FfLl]*" > What do you think would be better?
No, that does not work, either, because it splits X.Find into X .F ind. I fixed that very problem with the cpp driver recently. We do need a separate alternative for the floatingpoint numbers that start with a decimal point.
-- Hannes