2022-03-29 19:31:45 +00:00
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
#include <comdel/parser/parsecontext.h>
|
|
|
|
#include <comdel/parser/parserutil.h>
|
|
|
|
|
2022-03-31 21:20:41 +00:00
|
|
|
#include <comdel/domain/comdelgenerator.h>
|
|
|
|
|
2022-03-29 19:31:45 +00:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
QApplication a(argc, argv);
|
|
|
|
MainWindow w;
|
|
|
|
w.show();
|
|
|
|
return a.exec();
|
|
|
|
*/
|
|
|
|
|
|
|
|
ParseContext parseContext;
|
2022-03-31 21:20:41 +00:00
|
|
|
auto schema = loadSchemaFromFile(&parseContext, "/home/bbr/Documents/personal/projects/modeler/schema.csl", std::cout);
|
|
|
|
|
|
|
|
if(schema) {
|
|
|
|
std::vector<domain::FunctionSignature> signatures;
|
|
|
|
domain::ComdelGenerator generator(signatures);
|
|
|
|
generator.loadLibrary(*schema->library, &parseContext, std::cout);
|
|
|
|
|
|
|
|
for (auto& error : generator.getErrors()) {
|
|
|
|
parseContext.formatError(error, std::cout, "ERROR: ");
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-03-29 19:31:45 +00:00
|
|
|
}
|