From 86aca9a596a4c0b7436f3c1169cd3884b9082206 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sun, 14 Apr 2024 17:12:24 +0630 Subject: Added static assert to lexer in case of opcode changes --- asm/lexer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'asm/lexer.cpp') diff --git a/asm/lexer.cpp b/asm/lexer.cpp index ec80e19..c0ea978 100644 --- a/asm/lexer.cpp +++ b/asm/lexer.cpp @@ -16,6 +16,8 @@ #include "./lexer.hpp" +static_assert(NUMBER_OF_OPCODES == 98, "ERROR: Lexer is out of date"); + using std::string, std::string_view, std::pair, std::make_pair; constexpr auto VALID_SYMBOL = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUV" -- cgit v1.2.3-13-gbd6f