diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-04-14 17:12:24 +0630 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-04-14 17:12:24 +0630 |
commit | 86aca9a596a4c0b7436f3c1169cd3884b9082206 (patch) | |
tree | 50c327e7f813c664aa46fb624ff25f7054e43e2c | |
parent | e5ef0292e75bb80f314b512618d748873dfe2088 (diff) | |
download | ovm-86aca9a596a4c0b7436f3c1169cd3884b9082206.tar.gz ovm-86aca9a596a4c0b7436f3c1169cd3884b9082206.tar.bz2 ovm-86aca9a596a4c0b7436f3c1169cd3884b9082206.zip |
Added static assert to lexer in case of opcode changes
-rw-r--r-- | asm/lexer.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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" |