Language Initial
This commit is contained in:
parent
14cb588948
commit
fae4d83f97
47 changed files with 831 additions and 14 deletions
29
Language/tests/Tests.cpp
Normal file
29
Language/tests/Tests.cpp
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue