Implements variable assignment evaluation
This commit is contained in:
@@ -54,13 +54,19 @@ public:
|
||||
};
|
||||
|
||||
class BoundScriptStatement : public BoundBlockStatement{
|
||||
int _deepestScope;
|
||||
public:
|
||||
explicit BoundScriptStatement(vector<BoundStatement*> statements) : BoundBlockStatement(std::move(statements)){
|
||||
explicit BoundScriptStatement(vector<BoundStatement*> statements, int deepestScope) : BoundBlockStatement(std::move(statements)){
|
||||
_deepestScope = deepestScope;
|
||||
}
|
||||
|
||||
BoundStatementKind GetKind() final{
|
||||
return BoundStatementKind ::Script;
|
||||
}
|
||||
|
||||
int GetDeepestScope(){
|
||||
return _deepestScope;
|
||||
}
|
||||
};
|
||||
|
||||
class BoundExpressionStatement : public BoundStatement{
|
||||
@@ -98,6 +104,14 @@ public:
|
||||
BoundStatementKind GetKind() final{
|
||||
return BoundStatementKind ::Assignment;
|
||||
}
|
||||
|
||||
BoundVariableKey* GetKey(){
|
||||
return _key;
|
||||
}
|
||||
|
||||
BoundExpression* GetExpression(){
|
||||
return _expression;
|
||||
}
|
||||
};
|
||||
|
||||
#endif //PORYGONLANG_BOUNDSTATEMENT_HPP
|
||||
|
||||
Reference in New Issue
Block a user