Language Initial

This commit is contained in:
IlyaShurupov 2024-02-03 12:18:10 +03:00 committed by Ilya Shurupov
parent 73897f11df
commit b8f2380c60
47 changed files with 831 additions and 14 deletions

29
Language/tests/Tests.cpp Normal file
View file

@ -0,0 +1,29 @@
#include "Test.hpp"
using namespace tp;
void test() {
auto parser = SimpleParser();
auto grammar = Sentence(gGrammar);
auto sentence = Sentence(gSentence);
auto ast = AST();
parser.compileTables(grammar);
parser.parse(sentence, ast);
}
int main() {
tp::ModuleManifest* deps[] = { &tp::gModuleLanguage, nullptr };
tp::ModuleManifest testModule("Test", nullptr, nullptr, deps);
if (!testModule.initialize()) {
return 1;
}
test();
testModule.deinitialize();
}