Implements complex tables
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -25,6 +25,7 @@ enum class BoundExpressionKind{
|
||||
FunctionCall,
|
||||
Index,
|
||||
NumericalTable,
|
||||
Table,
|
||||
};
|
||||
|
||||
class BoundExpression{
|
||||
@@ -102,7 +103,7 @@ class BoundLiteralStringExpression : public BoundExpression{
|
||||
string _value;
|
||||
public:
|
||||
BoundLiteralStringExpression(string value, unsigned int start, unsigned int length)
|
||||
: BoundExpression(start, length, make_shared<ScriptType>(TypeClass::String)){
|
||||
: BoundExpression(start, length, make_shared<StringScriptType>(true, HashedString::ConstHash(value.c_str()))){
|
||||
_value = std::move(value);
|
||||
}
|
||||
|
||||
@@ -276,11 +277,11 @@ class BoundNumericalTableExpression : public BoundExpression{
|
||||
vector<BoundExpression*> _expressions;
|
||||
public:
|
||||
BoundNumericalTableExpression(vector<BoundExpression*> expressions, shared_ptr<ScriptType> type, unsigned int start, unsigned int length)
|
||||
: BoundExpression(start, length, type){
|
||||
: BoundExpression(start, length, std::move(type)){
|
||||
_expressions = std::move(expressions);
|
||||
}
|
||||
|
||||
~BoundNumericalTableExpression(){
|
||||
~BoundNumericalTableExpression() final{
|
||||
for (auto e: _expressions){
|
||||
delete e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user