diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3cd32c0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +/cmake-build-debug/** +/.idea/** \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..918c4c3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,44 @@ +cmake_minimum_required(VERSION 3.9) +project(SchemeEditor) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_INCLUDE_CURRENT_DIR ON) +find_package(Qt5 CONFIG REQUIRED COMPONENTS Core Gui Widgets) +set(CMAKE_AUTOMOC TRUE) +set(CMAKE_AUTORCC TRUE) +set(CMAKE_AUTOUIC TRUE) +add_executable(SchemeEditor + mainwindow.cpp + comdel/display/component_display.cpp + comdel/display/schema_display.cpp + comdel/display/library_display.cpp + comdel/domain/value.cpp + comdel/domain/schema.cpp + comdel/domain/component.cpp + comdel/domain/connectioninstance.cpp + comdel/domain/rule.cpp + comdel/domain/wireinstance.cpp + comdel/domain/attribute.cpp + comdel/domain/bus.cpp + comdel/domain/pin.cpp + comdel/domain/display.cpp + comdel/domain/library.cpp + comdel/domain/functionsignature.cpp + comdel/domain/addressspace.cpp + comdel/domain/instanceattribute.cpp + comdel/domain/connection.cpp + comdel/domain/instance.cpp + comdel/domain/comdelgenerator.cpp + comdel/parser/assert.cpp + comdel/parser/comdelparser.cpp + comdel/parser/token.cpp + comdel/parser/parser_util.cpp + comdel/parser/sourceerror.cpp + comdel/parser/parsecontext.cpp + comdel/parser/tokenstype.cpp + comdel/parser/astnode.cpp + comdel/parser/parserutil.cpp + comdel/parser/comdellexer.cpp + main.cpp + mainwindow.ui +) +target_link_libraries(SchemeEditor Qt5::Core Qt5::Gui Qt5::Widgets) diff --git a/comdel/domain/comdelgenerator.cpp b/comdel/domain/comdelgenerator.cpp index 9068270..c722d04 100644 --- a/comdel/domain/comdelgenerator.cpp +++ b/comdel/domain/comdelgenerator.cpp @@ -150,7 +150,7 @@ std::optional ComdelGenerator::loadLibrary(LibraryNode node) for(uint i=0; i signatures) - : signatures(signatures) -{} - -std::vector ComdelValidator::getErrors() { - return errors; -} - -void validateLibrary(Library library, ParseContext* parseContext, std::ostream& stream) { - -} - - -} // namespace domain diff --git a/comdel/domain/comdelvalidator.h b/comdel/domain/comdelvalidator.h deleted file mode 100644 index ee87d43..0000000 --- a/comdel/domain/comdelvalidator.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef DOMAIN_COMDELVALIDATOR_H -#define DOMAIN_COMDELVALIDATOR_H - -#include "functionsignature.h" -#include "library.h" - -#include - -#include -#include - -namespace domain { - -class ComdelValidator -{ -private: - std::vector errors; - std::vector signatures; - -public: - - ComdelValidator(std::vector signatures); - - std::vector getErrors() { - return errors; - } - - void validateLibrary(Library library, ParseContext* parseContext, std::ostream& stream); - -}; - -} // namespace domain - -#endif // DOMAIN_COMDELVALIDATOR_H diff --git a/comdel/domain/value.h b/comdel/domain/value.h index f9e457f..eb3cedc 100644 --- a/comdel/domain/value.h +++ b/comdel/domain/value.h @@ -6,6 +6,7 @@ #include #include + namespace domain { class Value diff --git a/comdel/parser/astnode.h b/comdel/parser/astnode.h index 26f4de9..f3c1241 100644 --- a/comdel/parser/astnode.h +++ b/comdel/parser/astnode.h @@ -66,7 +66,7 @@ struct AddressSpaceNode: public AstNode }; -class ValueNode: AstNode +class ValueNode: public AstNode { public: enum ValueType { diff --git a/main.cpp b/main.cpp index 547577a..cd2dba4 100644 --- a/main.cpp +++ b/main.cpp @@ -11,6 +11,8 @@ int main(int argc, char *argv[]) { + + QApplication a(argc, argv); MainWindow w; w.show();