NouVeL/NVL/Compiler.h

27 lines
622 B
C
Raw Normal View History

#pragma once
2023-04-07 16:04:30 -04:00
#include "Common.h"
#include "Parser.h"
#include "Environment.h"
#include <sstream>
namespace NVL::Compiler {
struct _DirectedGraphNode {
String description;
Vector<Vector<Environment::Variable>> sequence;
};
struct NVLGraph {
Vector<_DirectedGraphNode> nodes;
Vector<String> static_refs;
};
Environment::Variable StaticEval(const Environment::Environment& env, Vector<String>& refs, const Parse::Object& obj);
NVLGraph Compile(const Vector<Parse::Scene>& scenes, i32 entry_scene_index);
std::ostringstream Serialize(const NVLGraph& g);
NVLGraph Deserialize(std::istringstream& buf);
}