Added foundation for Lexer

This commit is contained in:
Pasha Bibko
2025-07-20 13:49:10 +01:00
parent 7768ba4522
commit 8f75e52a07
6 changed files with 47 additions and 4 deletions

View File

@@ -7,7 +7,7 @@ int main(int argc, char** argv)
using namespace LXC;
// Reads the given file to a string //
Util::ReturnVal fileContents = Util::ReadFile("example/example.lx");
Util::ReturnVal fileContents = Util::ReadFile("example/example.jk.lx");
if (fileContents.Failed())
{
// Stores the error for easier access //
@@ -26,5 +26,13 @@ int main(int argc, char** argv)
return -1;
}
// Turns the file contents into a vector of tokens //
Util::ReturnVal tokens = Lexer::TokenizeFile(fileContents);
if (tokens.Failed())
{
// Returns with default error code //
return -1;
}
return 0;
}