From 659cdf4e807b9f87c3bac49db48ce204d093dbd2 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sat, 25 Sep 2021 17:32:17 +0200 Subject: [PATCH] Make tok::LexerException and Parser::ParserException type definitions instead of extending the Yerbacon::Exception class --- src/headers/lex.hpp | 4 +--- src/headers/parsing/Parser.hpp | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/headers/lex.hpp b/src/headers/lex.hpp index 306eb38..03767c8 100644 --- a/src/headers/lex.hpp +++ b/src/headers/lex.hpp @@ -7,9 +7,7 @@ #include struct tok { - class LexerException: public Yerbacon::Exception { - using Yerbacon::Exception::Exception; - }; + typedef Yerbacon::Exception LexerException; enum type: const unsigned short { UNEXPECTED = std::numeric_limits::max() + 1, IDENTIFIER, NUMBER, ALPHACHAR, EOF_ = '\0', DEFINE = '=', TAG = '#', DOLLAR_SIGN = '$', DOT = '.', diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index a5e2f96..a42a2ff 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -7,9 +7,7 @@ #include namespace Parser { - class ParsingException: public Yerbacon::Exception { - using Yerbacon::Exception::Exception; - }; + typedef Yerbacon::Exception ParsingException; ParseTree parseVector(const vector& lexed) { ParseTree parseTree; using namespace StandardComponents;