Added CMake support

This commit is contained in:
Borna Rajkovic committed 2022-04-08 19:13:53 +02:00
1 parent b8bd4a678a
commit 0a0b20a156
8 files changed
+59 -54

No files matched your search

+1 -1
View File
@@ -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();
}
-18
View File
@@ -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
-34
View File
@@ -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
+1
View File
@@ -6,6 +6,7 @@
#include <string>
#include <optional>
namespace domain {
class Value
+1 -1
View File
@@ -66,7 +66,7 @@ struct AddressSpaceNode: public AstNode
};
class ValueNode: AstNode
class ValueNode: public AstNode
{
public:
enum ValueType {