Move 'system' module
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
import smnp.module.mic
|
from smnp.module import system, mic, note
|
||||||
import smnp.module.note
|
|
||||||
|
|
||||||
functions = [ *mic.functions, *note.functions ]
|
functions = [ *system.functions, *mic.functions, *note.functions ]
|
||||||
methods = [ *mic.methods, *note.methods ]
|
methods = [ *system.methods, *mic.methods, *note.methods ]
|
||||||
4
smnp/module/system/__init__.py
Normal file
4
smnp/module/system/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
from smnp.module.system.function import sleep, display, debug, exit, type
|
||||||
|
|
||||||
|
functions = [ debug.function, display.function, exit.function, sleep.function, type.function ]
|
||||||
|
methods = []
|
||||||
0
smnp/module/system/function/__init__.py
Normal file
0
smnp/module/system/function/__init__.py
Normal file
@@ -3,6 +3,7 @@ from smnp.library.model import Function
|
|||||||
from smnp.library.signature import signature, ofTypes
|
from smnp.library.signature import signature, ofTypes
|
||||||
from smnp.type.model import Type
|
from smnp.type.model import Type
|
||||||
|
|
||||||
|
|
||||||
_signature = signature(ofTypes(Type.STRING))
|
_signature = signature(ofTypes(Type.STRING))
|
||||||
def _function(env, parameter):
|
def _function(env, parameter):
|
||||||
if parameter.value == "environment":
|
if parameter.value == "environment":
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
from smnp.library.model import Function
|
from smnp.library.model import Function
|
||||||
from smnp.library.signature import signature, allTypes
|
from smnp.library.signature import signature, allTypes
|
||||||
|
from smnp.type.model import Type
|
||||||
|
|
||||||
_signature = signature(allTypes())
|
_signature = signature(allTypes())
|
||||||
def _function(env, obj):
|
def _function(env, obj):
|
||||||
return obj.type.name
|
return Type.type(obj.type)
|
||||||
|
|
||||||
|
|
||||||
function = Function(_signature, _function, 'type')
|
function = Function(_signature, _function, 'typeOf')
|
||||||
Reference in New Issue
Block a user