初始化提交
This commit is contained in:
15
boards/default_src/python/converters/logic.js
Normal file
15
boards/default_src/python/converters/logic.js
Normal file
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
//目前块都在python_to_blockly.js中实现
|
||||
pbc.globalFunctionD['bool'] = function (py2block, func, args, keywords, starargs, kwargs, node) {
|
||||
if (args.length != 1) {
|
||||
throw new Error("Incorrect number of arguments");
|
||||
}
|
||||
var numblock = py2block.convert(args[0]);
|
||||
return block("logic_tobool", func.lineno, {}, {
|
||||
'VAR': numblock,
|
||||
}, {
|
||||
"inline": "false"
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user