Added parser project

This commit is contained in:
Pasha Bibko
2025-07-23 19:33:33 +01:00
parent 6a534ba635
commit 86a178b7d5
10 changed files with 93 additions and 30 deletions

View File

@@ -1,6 +1,7 @@
#include <LXC.h>
#include <NodeTypes.h>
#include <Parser.h>
#include <Lexer.h>
int main(int argc, char** argv)
@@ -57,12 +58,17 @@ int main(int argc, char** argv)
Util::Log("Error occured in Lexer: ", Lexer::LexerError::ReasonStr(err.reason));
Util::Stop();
}
// Prints all of the tokens to the log //
for (const auto& token : tokens.Result())
else
{
Util::Log(token);
// Prints all of the tokensto the log //
for (const auto& token : tokens.Result())
{
Util::Log(token);
}
}
// Turns the tokens into into an abstract syntax tree //
Util::ReturnVal functionsAST = Parser::TurnTokensIntoAST(tokens);
return 0;
}