schema_editor/main.cpp

36 lines
827 B
C++

#include "mainwindow.h"
#include <QApplication>
#include <iostream>
#include <comdel/parser/parsecontext.h>
#include <comdel/parser/parserutil.h>
#include <comdel/domain/comdelgenerator.h>
int main(int argc, char *argv[])
{
/*
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
*/
ParseContext parseContext;
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: ");
}
}
}