builtup4/bu4/synced.py
2021-09-09 08:16:01 +03:00

18 lines
594 B
Python

# Copyright (c) PARRRATE T&V 2021. All rights reserved.
from bu4.evaluation.constructs.evalue import EValue
from bu4.evaluation.sync import sync
from bu4.linkable.toolchain.parse import parse
from bu4.linkable.toolchain.stdext import standard_extensions
from bu4.linkable.toolchain.transply import transply
from bu4.linking.evaluable_from_parsed import evaluable_from_parsed
__all__ = ('synced',)
def synced(source: str) -> EValue:
bsource = transply(source)
parsed = parse(bsource, standard_extensions)
evaluable = evaluable_from_parsed({}, parsed)
return sync(evaluable)