Closed lzhiyong closed 2 years ago
@bobbylight thanks
@bobbylight, there are still some problems.
// contains /
#include <sys/types.h>
// contains -
#include <gnu/libc-version.h>
// contains multiple spaces between # and include
// contains multiple spaces between include and <
# include <stdio.h>
# include <math.h>
I think the correct expression should be "#"[ \t\f]*"include"[ \t\f]*"<"[A-Za-z0-9_.-/]+">"
In addition, is there a way to highlight the import file? like Java
, kotlin
...
// highlight the java.util.ArrayList
import java.util.ArrayList;
Thanks, I've addressed the whitespace and /
and -
characters and published a 3.3.1-SNAPSHOT build to Sonatype with these changes.
As for your second question, are you asking for a way to highlight the imported file a different color than the surrounding <
and >
characters? Or are you asking if we can be smarter and highlight files known to be in the standard library?
As for your second question, are you asking for a way to highlight the imported file a different color than the surrounding
<
and>
characters? Or are you asking if we can be smarter and highlight files known to be in the standard library?
@bobbylight thanks, Specify package name color for example:
// like include
// highlight the 'com.xxx.package_name'
package com.xxx.package_name;
// highlight the 'com.xxx.class_name'
import com.xxx.class_name;
Description the
CPlusPlusTokenMaker.flex
andCTokenMaker.flex
can't parse header files correctly.like this:
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.flexPseudo code: