harn-vm 0.7.58

Async bytecode virtual machine for the Harn programming language
Documentation
1
2
3
4
5
6
7
8
9
use crate::value::{VmError, VmValue};

impl super::super::Vm {
    pub(super) fn execute_not(&mut self) -> Result<(), VmError> {
        let v = self.pop()?;
        self.stack.push(VmValue::Bool(!v.is_truthy()));
        Ok(())
    }
}