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>
enum highlight_type {
HighlightSection,
HighlightKeytype,
HighlightKey,
HighlightCmd,
HighlightIP,
HighlightCidr,
HighlightHost,
HighlightPort,
HighlightTable,
HighlightFwMark,
HighlightMTU,
HighlightSaveConfig,
HighlightKeepalive,
HighlightComment,
HighlightDelimiter,
HighlightError,
HighlightEnd
HighlightSection,
HighlightKeytype,
HighlightKey,
HighlightIP,
HighlightCidr,
HighlightHost,
HighlightPort,
HighlightMTU,
HighlightKeepalive,
HighlightComment,
HighlightDelimiter,
#ifndef MOBILE_WGQUICK_SUBSET
HighlightTable,
HighlightFwMark,
HighlightSaveConfig,
HighlightCmd,
#endif
HighlightError,
HighlightEnd
};
struct highlight_span {
enum highlight_type type;
size_t start, len;
enum highlight_type type;
size_t start, len;
};
struct highlight_span *highlight_config(const char *config);