-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathScriptParser.h
More file actions
41 lines (34 loc) · 823 Bytes
/
ScriptParser.h
File metadata and controls
41 lines (34 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#pragma once
#include <map>
#include <memory>
#include <string>
#include <string_view>
#include <vector>
struct Scene;
struct ScriptParserError {
ScriptParserError(std::string message) : message(std::move(message)) {}
std::string message;
};
class ScriptParser
{
public:
ScriptParser(const Scene& scene);
~ScriptParser();
void parseFile(const std::string& scriptFilePath);
struct ImportedProperty {
std::string type;
std::string name;
std::string defaultValue;
};
struct Script {
std::string superScript;
std::vector<ImportedProperty> importedProperties;
};
std::map<std::string, Script> scripts;
std::map<std::string, std::string> typeAliasMap;
std::string lastScript;
std::string getNativeImportPropertyList(const std::string& scriptName) const;
private:
const Scene& scene;
void* zip;
};