aboutsummaryrefslogtreecommitdiff
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/lexer.cpp7
-rw-r--r--asm/lexer.hpp4
-rw-r--r--asm/main.cpp2
3 files changed, 7 insertions, 6 deletions
diff --git a/asm/lexer.cpp b/asm/lexer.cpp
index c0ea978..d6c9883 100644
--- a/asm/lexer.cpp
+++ b/asm/lexer.cpp
@@ -1,8 +1,9 @@
/* Copyright (C) 2024 Aryadev Chavali
- * You may distribute and modify this code under the terms of the GPLv2
- * license. You should have received a copy of the GPLv2 license with
- * this file. If not, please write to: aryadev@aryadevchavali.com.
+ * You may distribute and modify this code under the terms of the
+ * GPLv2 license. You should have received a copy of the GPLv2
+ * license with this file. If not, please write to:
+ * aryadev@aryadevchavali.com.
* Created: 2024-04-14
* Author: Aryadev Chavali
diff --git a/asm/lexer.hpp b/asm/lexer.hpp
index 3b9243f..1257b97 100644
--- a/asm/lexer.hpp
+++ b/asm/lexer.hpp
@@ -18,7 +18,7 @@
#include <tuple>
#include <vector>
-enum token_type_t
+enum class token_type_t
{
PP_CONST, // %const(<symbol>)...
PP_USE, // %use <string>
@@ -80,7 +80,7 @@ struct token_t
std::ostream &operator<<(std::ostream &, token_t &);
-enum lerr_t
+enum class lerr_t
{
OK = 0,
INVALID_CHAR_LITERAL,
diff --git a/asm/main.cpp b/asm/main.cpp
index a168af1..51600cb 100644
--- a/asm/main.cpp
+++ b/asm/main.cpp
@@ -100,7 +100,7 @@ int main(int argc, const char *argv[])
}
std::cerr << file_name << ":" << line << ":" << col << ":"
<< lerr_as_cstr(lerr) << std::endl;
- ret = 255 - lerr;
+ ret = 255 - static_cast<int>(lerr);
goto end;
}
else