#pragma once #include #include #include namespace Interpret { struct InterpretationError : public std::exception { Token::Token errorToken; InterpretationError(Token::Token const & token, std::string const & msg); }; struct ExpectedArgument : public InterpretationError { ExpectedArgument(Token::Token const & token); }; struct ExpectedLabel : public InterpretationError { ExpectedLabel(Token::Token const & token); }; struct ExpectedValue : public InterpretationError { ExpectedValue(Token::Token const & token); }; struct ExpectedImmediate : public InterpretationError { ExpectedImmediate(Token::Token const & token); }; struct ExpectedImmediateOrMemory : public InterpretationError { ExpectedImmediateOrMemory(Token::Token const & token); }; struct ExpectedRegister : public InterpretationError { ExpectedRegister(Token::Token const & token); }; struct ExpectedRegisterOrMemory : public InterpretationError { ExpectedRegisterOrMemory(Token::Token const & token); }; struct ExpectedOperand : public InterpretationError { ExpectedOperand(Token::Token const & token); }; struct TooManyArguments : public InterpretationError { TooManyArguments(Token::Token const & token); }; struct TooFewArguments : public InterpretationError { TooFewArguments(Token::Token const & token); }; struct MissingEndOfStatment : public InterpretationError { MissingEndOfStatment(Token::Token const & token); }; namespace Internal { struct BadTokenForValue : public InterpretationError { BadTokenForValue(Token::Token const & token); }; } }