42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
#ifndef DOMAIN_COMDELGENERATOR_H
|
|
#define DOMAIN_COMDELGENERATOR_H
|
|
|
|
#include "library.h"
|
|
|
|
#include <comdel/parser/astnode.h>
|
|
#include <comdel/parser/parsecontext.h>
|
|
#include <comdel/parser/presult.h>
|
|
|
|
namespace domain {
|
|
|
|
class ComdelGenerator
|
|
{
|
|
std::vector<SourceError> errors;
|
|
std::vector<FunctionSignature> signatures;
|
|
|
|
std::optional<AddressSpace> loadAddressSpace(AddressSpaceNode node);
|
|
std::optional<Component> loadComponent(ComponentNode node);
|
|
std::optional<Attribute> loadAttribute(AttributeNode node);
|
|
std::optional<Rule> loadRule(RuleNode node);
|
|
std::optional<Condition> loadCondition(ConditionNode node);
|
|
std::optional<Popup> loadPopup(PopupNode node, std::string name, Value::ValueType type);
|
|
std::optional<Display> loadDisplay(DisplayNode node);
|
|
std::optional<Pin> loadPin(PinNode pins);
|
|
PinConnection loadPinConnection(PinConnectionNode node);
|
|
std::optional<Connection> loadConnection(ConnectionNode node);
|
|
std::optional<Bus> loadBus(BusNode node);
|
|
|
|
public:
|
|
ComdelGenerator(std::vector<FunctionSignature> signatures);
|
|
|
|
std::vector<SourceError> getErrors() {
|
|
return errors;
|
|
}
|
|
|
|
std::optional<Library> loadLibrary(LibraryNode node, ParseContext* parseContext, std::ostream& stream);
|
|
};
|
|
|
|
} // namespace domain
|
|
|
|
#endif // DOMAIN_COMDELGENERATOR_H
|