aboutsummaryrefslogtreecommitdiff
path: root/asm/lexer.cpp
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2024-04-14 17:12:24 +0630
committerAryadev Chavali <aryadev@aryadevchavali.com>2024-04-14 17:12:24 +0630
commit86aca9a596a4c0b7436f3c1169cd3884b9082206 (patch)
tree50c327e7f813c664aa46fb624ff25f7054e43e2c /asm/lexer.cpp
parente5ef0292e75bb80f314b512618d748873dfe2088 (diff)
downloadovm-86aca9a596a4c0b7436f3c1169cd3884b9082206.tar.gz
ovm-86aca9a596a4c0b7436f3c1169cd3884b9082206.tar.bz2
ovm-86aca9a596a4c0b7436f3c1169cd3884b9082206.zip
Added static assert to lexer in case of opcode changes
Diffstat (limited to 'asm/lexer.cpp')
-rw-r--r--asm/lexer.cpp2
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"