Added CMake support
This commit is contained in:
parent
b8bd4a678a
commit
0a0b20a156
|
@ -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/**
|
|
@ -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)
|
|
@ -150,7 +150,7 @@ std::optional<Library> ComdelGenerator::loadLibrary(LibraryNode node)
|
|||
|
||||
for(uint i=0; i<node.messages.size(); i++) {
|
||||
if(!node.messages[i].value.is(ValueNode::STRING)) {
|
||||
errors.push_back(SourceError{node.messages[i].span, "expected `string`"});
|
||||
errors.push_back(SourceError{node.messages[i].value.span, "expected `string`"});
|
||||
} else {
|
||||
messages[node.messages[i].key.value] = node.messages[i].value.asString();
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#include "comdelvalidator.h"
|
||||
|
||||
namespace domain {
|
||||
|
||||
ComdelValidator::ComdelValidator(std::vector<FunctionSignature> signatures)
|
||||
: signatures(signatures)
|
||||
{}
|
||||
|
||||
std::vector<SourceError> ComdelValidator::getErrors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
void validateLibrary(Library library, ParseContext* parseContext, std::ostream& stream) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
} // namespace domain
|
|
@ -1,34 +0,0 @@
|
|||
#ifndef DOMAIN_COMDELVALIDATOR_H
|
||||
#define DOMAIN_COMDELVALIDATOR_H
|
||||
|
||||
#include "functionsignature.h"
|
||||
#include "library.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <comdel/parser/parsecontext.h>
|
||||
#include <comdel/parser/sourceerror.h>
|
||||
|
||||
namespace domain {
|
||||
|
||||
class ComdelValidator
|
||||
{
|
||||
private:
|
||||
std::vector<SourceError> errors;
|
||||
std::vector<FunctionSignature> signatures;
|
||||
|
||||
public:
|
||||
|
||||
ComdelValidator(std::vector<FunctionSignature> signatures);
|
||||
|
||||
std::vector<SourceError> getErrors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
void validateLibrary(Library library, ParseContext* parseContext, std::ostream& stream);
|
||||
|
||||
};
|
||||
|
||||
} // namespace domain
|
||||
|
||||
#endif // DOMAIN_COMDELVALIDATOR_H
|
|
@ -6,6 +6,7 @@
|
|||
#include <string>
|
||||
#include <optional>
|
||||
|
||||
|
||||
namespace domain {
|
||||
|
||||
class Value
|
||||
|
|
|
@ -66,7 +66,7 @@ struct AddressSpaceNode: public AstNode
|
|||
};
|
||||
|
||||
|
||||
class ValueNode: AstNode
|
||||
class ValueNode: public AstNode
|
||||
{
|
||||
public:
|
||||
enum ValueType {
|
||||
|
|
Loading…
Reference in New Issue