userdiff-cpp: learn the C++ spaceship operator
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
		
				
					committed by
					
						
						Junio C Hamano
					
				
			
			
				
	
			
			
			
						parent
						
							637b80cd6a
						
					
				
				
					commit
					c4fdba3383
				
			@ -72,7 +72,7 @@ PATTERNS("cpp",
 | 
			
		||||
	 "|0[xXbB][0-9a-fA-F']+[lLuU]*"
 | 
			
		||||
	 /* floatingpoint numbers that begin with a decimal point */
 | 
			
		||||
	 "|\\.[0-9][0-9']*([Ee][-+]?[0-9]+)?[fFlL]?"
 | 
			
		||||
	 "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*"),
 | 
			
		||||
	 "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->\\*?|\\.\\*|<=>"),
 | 
			
		||||
PATTERNS("csharp",
 | 
			
		||||
	 /* Keywords */
 | 
			
		||||
	 "!^[ \t]*(do|while|for|if|else|instanceof|new|return|switch|case|throw|catch|using)\n"
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user