From 8cb2140bbeb2baa4db3de40e2b9b3c34914e4bcf Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 28 Dec 2020 22:44:25 -0500 Subject: Add mdoc lexer --- bin/hilex/hilex.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'bin/hilex/hilex.c') 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); -- cgit 1.4.1