From 53614a3854b63e309141bc34c1851831bb013213 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 12 Mar 2024 10:38:45 +0100 Subject: [PATCH] Keep utf8 characters together in comments Analogous to the fortrancode (#10728) also do this in the fortranscanner. --- src/fortranscanner.l | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 3afb808f201..fbbb1103713 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -445,6 +445,7 @@ FILEMASK {VFILEMASK}|{HFILEMASK} } pop_state(yyscanner); } +[\x80-\xFF]* | . { if (yy_top_state(yyscanner) == Initialization || yy_top_state(yyscanner) == ArrayInitializer) { @@ -485,6 +486,7 @@ FILEMASK {VFILEMASK}|{HFILEMASK} .?/\n { pop_state(yyscanner); // comment ends with endline character DBG_CTX((stderr,"end comment %d %s\n",yyextra->lineNr,qPrint(yyextra->debugStr))); } // comment line ends +[\x80-\xFF]* | . { yyextra->debugStr+=yytext; }