[PATCH 3/3] userdiff: learn the C++ spaceship operator
- From
Johannes Sixt via GitGitGadget <gitgitgadget@gmail.com>
- Date
- Oct 7, 2021, 06:51 UTC
- Message-ID
- <df66485e7f019dd81f53f73fd3772bf0b678059d.1633589461.git.gitgitgadget@gmail.com>
- In-Reply-To
- <pull.1054.git.1633589461.gitgitgadget@gmail.com>
From: Johannes Sixt <j6t@kdbg.org>
Since C++20, the language has a generalized comparison operator. Teach the cpp driver not to separate it into <= and > tokens.
Signed-off-by: Johannes Sixt <j6t@kdbg.org> --- userdiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/userdiff.c b/userdiff.c index 1b640c7df79..13cec0b48db 100644 --- a/userdiff.c +++ b/userdiff.c @@ -62,7 +62,7 @@ PATTERNS("cpp", "|0[xXbB][0-9a-fA-F']+[lLuU]*" /* floatingpoint numbers that begin with a decimal point */ "|\\.[0-9']+([Ee][-+]?[0-9]+)?[fFlL]?" - "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*"), + "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*|<=>"), PATTERNS("csharp", /* Keywords */ "!^[ \t]*(do|while|for|if|else|instanceof|new|return|switch|case|throw|catch|using)\n"
-- gitgitgadget