Implements basics for UserData
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "Binder.hpp"
|
||||
#include "../TableScriptType.hpp"
|
||||
#include "BoundExpressions/BoundTableExpression.hpp"
|
||||
#include "../UserData/UserDataScriptType.hpp"
|
||||
#include <memory>
|
||||
|
||||
BoundScriptStatement *Binder::Bind(Script* script, const ParsedScriptStatement *s, BoundScope* scriptScope) {
|
||||
@@ -74,7 +75,7 @@ std::shared_ptr<ScriptType> ParseTypeIdentifier(HashedString s){
|
||||
case HashedString::ConstHash("number"): return std::make_shared<NumericScriptType>(false, false);
|
||||
case HashedString::ConstHash("bool"): return std::make_shared<ScriptType>(TypeClass::Bool);
|
||||
case HashedString::ConstHash("string"): return std::make_shared<StringScriptType>(false, 0);
|
||||
default: return std::make_shared<ScriptType>(TypeClass::Error); // todo: change to userdata
|
||||
default: return std::make_shared<UserDataScriptType>(s.GetHash());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user