mirror of
https://github.com/PashaBibko/LX.git
synced 2026-04-04 01:49:05 +00:00
Fixed bugs in Lexer
Also added basic math operators
This commit is contained in:
8
Main.cpp
8
Main.cpp
@@ -74,24 +74,32 @@ int main(int argc, char** argv)
|
||||
{
|
||||
// Tells the user the output file could not be opened
|
||||
std::cout << "\nCould not open/create {" << argv[2] << "}\n";
|
||||
|
||||
return 3;
|
||||
}
|
||||
|
||||
catch (LX::InvalidCharInSource& e)
|
||||
{
|
||||
//
|
||||
std::cout << "\nInvalid character found in source file: {" << e.invalid << "} at index: " << e.index << "\n";
|
||||
|
||||
return 4;
|
||||
}
|
||||
|
||||
catch (std::exception& e)
|
||||
{
|
||||
// Prints the std exception to the console
|
||||
std::cout << "\nAn error occured:\n" << e.what() << std::endl;
|
||||
|
||||
return 5;
|
||||
}
|
||||
|
||||
catch (...)
|
||||
{
|
||||
// Tells the user if an error has happened
|
||||
std::cout << "\nAn Error occured\n";
|
||||
|
||||
return 6;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user