Highlighter: use original file from contrib/examples/highlighter

This makes it easier to track updates and make diffs. Also, disable
things we don't support in the NetworkExtension app.
This commit is contained in:
Jason A. Donenfeld 2019-01-07 12:02:23 -05:00 committed by Roopesh Chander
parent 3795a06e92
commit 1c7ae7a334
2 changed files with 504 additions and 494 deletions

File diff suppressed because it is too large Load Diff

View File

@ -6,28 +6,30 @@
#include <sys/types.h> #include <sys/types.h>
enum highlight_type { enum highlight_type {
HighlightSection, HighlightSection,
HighlightKeytype, HighlightKeytype,
HighlightKey, HighlightKey,
HighlightCmd, HighlightIP,
HighlightIP, HighlightCidr,
HighlightCidr, HighlightHost,
HighlightHost, HighlightPort,
HighlightPort, HighlightMTU,
HighlightTable, HighlightKeepalive,
HighlightFwMark, HighlightComment,
HighlightMTU, HighlightDelimiter,
HighlightSaveConfig, #ifndef MOBILE_WGQUICK_SUBSET
HighlightKeepalive, HighlightTable,
HighlightComment, HighlightFwMark,
HighlightDelimiter, HighlightSaveConfig,
HighlightError, HighlightCmd,
HighlightEnd #endif
HighlightError,
HighlightEnd
}; };
struct highlight_span { struct highlight_span {
enum highlight_type type; enum highlight_type type;
size_t start, len; size_t start, len;
}; };
struct highlight_span *highlight_config(const char *config); struct highlight_span *highlight_config(const char *config);