From a8ce85adbf2863e98e5c24e9cc6f82947d4b3a29 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Tue, 21 Jul 2020 18:42:27 +0200 Subject: Support _Static_assert from C11 --- cparser/Lexer.mll | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cparser/Lexer.mll') diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll index e44a330f..881d411a 100644 --- a/cparser/Lexer.mll +++ b/cparser/Lexer.mll @@ -35,6 +35,7 @@ let () = ("_Bool", fun loc -> UNDERSCORE_BOOL loc); ("_Complex", fun loc -> reserved_keyword loc "_Complex"); ("_Imaginary", fun loc -> reserved_keyword loc "_Imaginary"); + ("_Static_assert", fun loc -> STATIC_ASSERT loc); ("__alignof", fun loc -> ALIGNOF loc); ("__alignof__", fun loc -> ALIGNOF loc); ("__asm", fun loc -> ASM loc); @@ -577,6 +578,7 @@ and singleline_comment = parse | Pre_parser.SLASH loc -> loop (Parser.SLASH loc) | Pre_parser.STAR loc -> loop (Parser.STAR loc) | Pre_parser.STATIC loc -> loop (Parser.STATIC loc) + | Pre_parser.STATIC_ASSERT loc -> loop (Parser.STATIC_ASSERT loc) | Pre_parser.STRING_LITERAL (wide, str, loc) -> (* Merge consecutive string literals *) let rec doConcat wide str = -- cgit