From: Johannes Sixt via GitGitGadget Date: Fri, 08 Oct 2021 19:09:56 GMT Subject: [PATCH v2 4/5] userdiff-cpp: permit the digit-separating single-quote in numbers Message-ID: In-Reply-To: From: Johannes Sixt Since C++17, the single-quote can be used as digit separator: 3.141'592'654 1'000'000 0xdead'beaf Make it known to the word regex of the cpp driver, so that numbers are not split into separate tokens at the single-quotes. Signed-off-by: Johannes Sixt --- t/t4034/cpp/expect | 10 +++++----- t/t4034/cpp/post | 8 ++++---- t/t4034/cpp/pre | 8 ++++---- userdiff.c | 6 +++--- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/t/t4034/cpp/expect b/t/t4034/cpp/expect index 46c9460a968..a3a234f5461 100644 --- a/t/t4034/cpp/expect +++ b/t/t4034/cpp/expect @@ -1,5 +1,5 @@ diff --git a/pre b/post -index 1229cdb..3feae6f 100644 +index 60f3640..f6fbf7b 100644 --- a/pre +++ b/post @@ -1,30 +1,30 @@ @@ -7,15 +7,15 @@ Foo() : x(0&&1&42) { foo0bar cout<<"Hello World!?\n"<(1 -+1e10 0xabcdef) 'xy' // long double -3.141592653e-10l3.141592654e+10l +3.141'592'653e-10l3.141'592'654e+10l // float 120E5f120E6f // hex -0xdeadbeaf0xdeadBeaf+8ULL7ULL +0xdead'beaf0xdead'Beaf+8ULL7ULL // octal -0123456701234560 +0123'45670123'4560 // binary -0b10000b1100+e1 +0b10'000b11'00+e1 // expression 1.5-e+23+f // another one diff --git a/t/t4034/cpp/post b/t/t4034/cpp/post index 3feae6f430f..f6fbf7bc04c 100644 --- a/t/t4034/cpp/post +++ b/t/t4034/cpp/post @@ -2,15 +2,15 @@ Foo() : x(0&42) { bar(x.Find); } cout<<"Hello World?\n"<%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*"), PATTERNS("csharp", /* Keywords */ -- gitgitgadget