fix typos

This commit is contained in:
IlyaShurupov 2024-03-25 09:23:25 +03:00 committed by Ilya Shurupov
parent 9e2e7f5809
commit ca1ae75b07
18 changed files with 62 additions and 55 deletions

View file

@ -223,7 +223,7 @@ void Interpreter::stepBytecodeIn() {
case OpCode::PRINT:
{
auto obj = mOperandsStack.getOperand();
if (obj->type->convesions && obj->type->convesions->to_string) {
if (obj->type->conversions && obj->type->conversions->to_string) {
auto str = NDO->toString(obj);
printf("%s\n", str.c_str());
} else {
@ -390,10 +390,10 @@ void Interpreter::stepBytecodeIn() {
auto right = mOperandsStack.getOperand();
ASSERT(left->type == right->type && "addition of different types is not implemented");
ASSERT(left->type->ariphmetics && left->type->ariphmetics->add && "cannot add object of this type");
ASSERT(left->type->arithmetics && left->type->arithmetics->add && "cannot add object of this type");
auto res = NDO->instantiate(left);
res->type->ariphmetics->add(res, right);
res->type->arithmetics->add(res, right);
mScopeStack.addTemp(res);
mOperandsStack.push(res);
@ -405,10 +405,10 @@ void Interpreter::stepBytecodeIn() {
auto right = mOperandsStack.getOperand();
ASSERT(left->type == right->type && "addition of different types is not implemented");
ASSERT(left->type->ariphmetics && left->type->ariphmetics->add && "cannot add object of this type");
ASSERT(left->type->arithmetics && left->type->arithmetics->add && "cannot add object of this type");
auto res = NDO->instantiate(left);
res->type->ariphmetics->sub(res, right);
res->type->arithmetics->sub(res, right);
mScopeStack.addTemp(res);
mOperandsStack.push(res);
@ -420,10 +420,10 @@ void Interpreter::stepBytecodeIn() {
auto right = mOperandsStack.getOperand();
ASSERT(left->type == right->type && "addition of different types is not implemented");
ASSERT(left->type->ariphmetics && left->type->ariphmetics->add && "cannot add object of this type");
ASSERT(left->type->arithmetics && left->type->arithmetics->add && "cannot add object of this type");
auto res = NDO->instantiate(left);
res->type->ariphmetics->mul(res, right);
res->type->arithmetics->mul(res, right);
mScopeStack.addTemp(res);
mOperandsStack.push(res);
@ -435,10 +435,10 @@ void Interpreter::stepBytecodeIn() {
auto right = mOperandsStack.getOperand();
ASSERT(left->type == right->type && "addition of different types is not implemented");
ASSERT(left->type->ariphmetics && left->type->ariphmetics->add && "cannot add object of this type");
ASSERT(left->type->arithmetics && left->type->arithmetics->add && "cannot add object of this type");
auto res = NDO->instantiate(left);
res->type->ariphmetics->div(res, right);
res->type->arithmetics->div(res, right);
mScopeStack.addTemp(res);
mOperandsStack.push(res);