RSyntaxTextArea
RSyntaxTextArea copied to clipboard
[Bug]: Highlight the import files
Description
the CPlusPlusTokenMaker.flex and CTokenMaker.flex can't parse header files correctly.
like this: <xxx.h>

Expected behavior Can correctly highlight header files.
like this:

Java version openjdk-17
Additional context
I can't fix this as I'm not familiar with the Jflex syntax.
see the cpp.flex
Pseudo code:
/* Add state to import files */
%state IMPORT_FILE
%%
<YYINITIAL> {
...
/* Preprocessor directives */
"#"{WhiteSpace}*{PreprocessorWord} { start = zzMarkedPos-2; yybegin(IMPORT_FILE); }
<IMPORT_FILE>{
/* <xxx.h> or <xxx> as the StringLiteral */
{WhiteSpace}\*<{AnyChrChr}> { int temp=zzStartRead; addToken(start,zzStartRead-1, Token.PREPROCESSOR); addToken(temp,zzMarkedPos-1, Token.LITERAL_CHAR); start = zzMarkedPos; }
\n { addToken(start,zzStartRead-1, Token.LITERAL_CHAR); return firstToken; }
<<EOF>> { addToken(start,zzStartRead-1, Token.LITERAL_CHAR); return firstToken; }
}
}