Step 16: remove ToBoolStatement
This commit is contained in:
1 parent
565dbf98ed
commit
ae88898f58
2 files changed
+3
-12
No files matched your search
@@ -439,15 +439,6 @@ class ThrowStatement(
|
||||
}
|
||||
}
|
||||
|
||||
class ToBoolStatement(
|
||||
val expr: Statement,
|
||||
override val pos: Pos,
|
||||
) : Statement() {
|
||||
override suspend fun execute(scope: Scope): Obj {
|
||||
return if (expr.execute(scope).toBool()) net.sergeych.lyng.obj.ObjTrue else net.sergeych.lyng.obj.ObjFalse
|
||||
}
|
||||
}
|
||||
|
||||
class ExpressionStatement(
|
||||
val ref: net.sergeych.lyng.obj.ObjRef,
|
||||
override val pos: Pos
|
||||
|
||||
Reference in new issue
Block a user