utils.py 386 B

1234567891011121314
  1. import math
  2. def log(s: str) -> None:
  3. print(termcolor.colored("log: ",'blue')+s)
  4. from sccd.action_lang.static.types import *
  5. SCCD_EXPORTS = {
  6. "log10": (math.log10, SCCDFunction([SCCDInt], SCCDFloat)),
  7. "print": (log, SCCDFunction([SCCDString])),
  8. "float_to_int": (int, SCCDFunction([SCCDFloat], SCCDInt)),
  9. "int_to_str": (str, SCCDFunction([SCCDInt], SCCDString)),
  10. }