ParseSmartContract
对用户编写的合约代码进行解析!
// we have a rudimentary line by line parser
// SC authors must make sure code coverage is 100 %
// we are doing away with AST
封装了 parse_function_line
check_valid_name
// checks whether a function name is valid
// a valid name starts with a non digit and does not contain .
check_valid_type
parse_function_line
// this will parse 1 line at a time, if there is an error, it is returned
runSmartContract_internal
// this will run a function from a loaded SC and execute it if possible
// it can run all internal functions
// parameters must be passed as strings
格式化等处理后,交给虚拟机处理。
封装了 interpret_SmartContract
RunSmartContract
执行合约代码!
// 输入包括:源代码、入口、状态、参数
封装了 runSmartContract_internal