aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Lexer.mll
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-07-21 18:42:27 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2020-07-21 18:45:28 +0200
commita8ce85adbf2863e98e5c24e9cc6f82947d4b3a29 (patch)
treec289886f88b58716ecfe0f7261594a231a3b21be /cparser/Lexer.mll
parent3a1b0e98a09dd9688e8f45f9677b7ea25f4720bf (diff)
downloadcompcert-kvx-a8ce85adbf2863e98e5c24e9cc6f82947d4b3a29.tar.gz
compcert-kvx-a8ce85adbf2863e98e5c24e9cc6f82947d4b3a29.zip
Support _Static_assert from C11
Diffstat (limited to 'cparser/Lexer.mll')
-rw-r--r--cparser/Lexer.mll2
1 files changed, 2 insertions, 0 deletions
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 =