diff options
author | June McEnroe <june@causal.agency> | 2020-12-28 22:44:25 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-12-28 22:48:06 -0500 |
commit | 8cb2140bbeb2baa4db3de40e2b9b3c34914e4bcf (patch) | |
tree | a13b7190bd15772b95f599e2819279b8d3299fa3 /bin/hilex/hilex.c | |
parent | Lex strings inside macros (diff) | |
download | src-8cb2140bbeb2baa4db3de40e2b9b3c34914e4bcf.tar.gz src-8cb2140bbeb2baa4db3de40e2b9b3c34914e4bcf.zip |
Add mdoc lexer
Diffstat (limited to '')
-rw-r--r-- | bin/hilex/hilex.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/hilex/hilex.c b/bin/hilex/hilex.c index e973f0cd..aa8d4e05 100644 --- a/bin/hilex/hilex.c +++ b/bin/hilex/hilex.c @@ -32,6 +32,7 @@ static const struct { const char *pattern; } Lexers[] = { { &LexC, "c", "[.][chlmy]$" }, + { &LexMdoc, "mdoc", "[.][1-9]$" }, { &LexText, "text", "[.]txt$" }, }; @@ -123,6 +124,7 @@ int main(int argc, char *argv[]) { *lexer->in = file; if (formatter->header) formatter->header(NULL); for (enum Class class; None != (class = lexer->lex());) { + assert(class < ClassCap); formatter->format(NULL, class, *lexer->text); } if (formatter->footer) formatter->footer(NULL); |