builtup4/bu4/evaluation/constructs/eidelayed.py

26 lines
715 B
Python

# Copyright (c) PARRRATE T&V 2021. All rights reserved.
from bu4.evaluation.av.evtype import evtype
from bu4.evaluation.constructs.eattachable import EAttachable
from bu4.evaluation.constructs.evaluable import Evaluable
from bu4.evaluation.constructs.evalue import EValue
from bu4.indexing.constructs.indexed import Indexed
__all__ = ('EIDelayed',)
class EIDelayed(EValue):
def __init__(self, ev: evtype, value: Indexed):
self.ev = ev
self.value = value
self.evaluable = EAttachable(
self.ev,
self.value
)
def call(self, argument: Evaluable) -> Evaluable:
return self.evaluable
def __str__(self):
return f'(()){self.value}'