From 323a738a5351eecba32bd464ff0e8d5536a7882f Mon Sep 17 00:00:00 2001 From: BlBana <635373043@qq.com> Date: Mon, 4 Sep 2017 18:48:54 +0800 Subject: [PATCH 1/2] Optimize the code --- cobra/parser.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cobra/parser.py b/cobra/parser.py index 7abd4b64..67dc55d4 100644 --- a/cobra/parser.py +++ b/cobra/parser.py @@ -119,6 +119,7 @@ def get_binaryop_params(node): # 当为BinaryOp类型时,分别对left和righ """ logger.debug('[AST] Binaryop --> {node}'.format(node=node)) params = [] + buffer_ = [] if isinstance(node.left, php.Variable) or isinstance(node.right, php.Variable): # left, right都为变量直接取值 if isinstance(node.left, php.Variable): @@ -133,6 +134,7 @@ def get_binaryop_params(node): # 当为BinaryOp类型时,分别对left和righ params = params_left + params_right + params = export_list(params, buffer_) return params @@ -178,6 +180,10 @@ def get_expr_name(node): # expr为'expr'中的值 param_lineno = node.lineno is_re = is_repair(node.name) # 调用了函数,判断调用的函数是否为修复函数 + elif isinstance(node, php.BinaryOp): # 当赋值表达式为BinaryOp + param_expr = get_binaryop_params(node) + param_lineno = node.lineno + else: param_expr = node From ffefb274b0e0ea178aee319ef06e14371004061e Mon Sep 17 00:00:00 2001 From: Feei Date: Mon, 4 Sep 2017 19:05:03 +0800 Subject: [PATCH 2/2] v2.0.0-alpha --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 1d6f6b6a..33dae09b 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ [![GitHub (pre-)release](https://img.shields.io/github/release/wufeifei/cobra/all.svg)](https://github.com/wufeifei/cobra/releases) [![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/wufeifei/cobra/blob/master/LICENSE) -当前版本非正式版本,正式版本正在做最后的内测中,建议等正式版本出来后再使用,敬请期待! [![asciicast](https://raw.githubusercontent.com/wufeifei/cobra/master/docs/report_03.jpg)](https://asciinema.org/a/132572) ## Introduction(介绍)