Move 'string' module and fix 'typeOf' function

This commit is contained in:
Bartłomiej Pluta
2019-07-09 22:40:51 +02:00
parent 0571e3f1e2
commit 9cd7c219dc
5 changed files with 8 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
from smnp.module import system, mic, note, iterable, sound, synth
from smnp.module import system, mic, note, iterable, sound, synth, string
functions = [ *system.functions, *mic.functions, *note.functions, *iterable.functions, *sound.functions, *synth.functions ]
methods = [ *system.methods, *mic.methods, *note.methods, *iterable.methods, *sound.methods, *synth.methods ]
functions = [ *system.functions, *mic.functions, *note.functions, *iterable.functions, *sound.functions, *synth.functions, *string.functions ]
methods = [ *system.methods, *mic.methods, *note.methods, *iterable.methods, *sound.methods, *synth.methods, *string.functions ]

View File

@@ -0,0 +1,4 @@
from smnp.module.string.function import concat
functions = [ concat.function ]
methods = []

View File

View File

@@ -14,7 +14,7 @@ class Type(Enum):
PERCENT = (float, lambda x: f"{int(x * 100)}%")
NOTE = (Note, lambda x: x.note.name)
SOUND = (Sound, lambda x: x.file)
TYPE = (None, lambda x: str(x.type.name.lower()))
TYPE = (None, lambda x: x.name.lower())
VOID = (type(None), lambda x: _failStringify(Type.VOID))
def stringify(self, element):