Replace object parser with lalr library
This commit is contained in:
parent
3ba4bef93b
commit
f666416696
13 changed files with 499 additions and 995 deletions
16
Objects/tests/TestParser.cpp
Normal file
16
Objects/tests/TestParser.cpp
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
#include "Testing.hpp"
|
||||
|
||||
#include "parser/parser.h"
|
||||
|
||||
using namespace tp;
|
||||
using namespace obj;
|
||||
|
||||
TEST_DEF_STATIC(Basic) {
|
||||
Parser parser;
|
||||
|
||||
String stream = "{ var i; print false; }";
|
||||
auto res = parser.parse(stream);
|
||||
}
|
||||
|
||||
TEST_DEF(Parser) { testBasic(); }
|
||||
|
|
@ -6,6 +6,7 @@
|
|||
using namespace tp;
|
||||
using namespace obj;
|
||||
|
||||
void testParser();
|
||||
void testCore();
|
||||
void testPrimitives();
|
||||
void testInterpreter();
|
||||
|
|
@ -15,6 +16,11 @@ int main() {
|
|||
tp::ModuleManifest* deps[] = { &gModuleObjects, nullptr };
|
||||
tp::ModuleManifest module("ObjectsTests", nullptr, nullptr, deps);
|
||||
|
||||
if (module.initialize()) {
|
||||
testParser();
|
||||
module.deinitialize();
|
||||
}
|
||||
|
||||
if (module.initialize()) {
|
||||
testCore();
|
||||
module.deinitialize();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue