Make tok::LexerException and Parser::ParserException type definitions instead of extending the Yerbacon::Exception class

This commit is contained in:
Username404 2021-09-25 17:32:17 +02:00
parent facf460923
commit 659cdf4e80
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
2 changed files with 2 additions and 6 deletions

View File

@ -7,9 +7,7 @@
#include <ostream> #include <ostream>
struct tok { struct tok {
class LexerException: public Yerbacon::Exception { typedef Yerbacon::Exception LexerException;
using Yerbacon::Exception::Exception;
};
enum type: const unsigned short { enum type: const unsigned short {
UNEXPECTED = std::numeric_limits<unsigned char>::max() + 1, IDENTIFIER, NUMBER, ALPHACHAR, UNEXPECTED = std::numeric_limits<unsigned char>::max() + 1, IDENTIFIER, NUMBER, ALPHACHAR,
EOF_ = '\0', DEFINE = '=', TAG = '#', DOLLAR_SIGN = '$', DOT = '.', EOF_ = '\0', DEFINE = '=', TAG = '#', DOLLAR_SIGN = '$', DOT = '.',

View File

@ -7,9 +7,7 @@
#include <concepts> #include <concepts>
namespace Parser { namespace Parser {
class ParsingException: public Yerbacon::Exception { typedef Yerbacon::Exception ParsingException;
using Yerbacon::Exception::Exception;
};
ParseTree parseVector(const vector<tok>& lexed) { ParseTree parseVector(const vector<tok>& lexed) {
ParseTree parseTree; ParseTree parseTree;
using namespace StandardComponents; using namespace StandardComponents;