Skip to content
This repository was archived by the owner on Nov 28, 2023. It is now read-only.

Commit e3e29b4

Browse files
authored
Merge pull request #530 from wufeifei/develop
v2.0.0-alpha
2 parents 58ce500 + ffefb27 commit e3e29b4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[![GitHub (pre-)release](https://img.shields.io/github/release/wufeifei/cobra/all.svg)](https://github.com/wufeifei/cobra/releases)
55
[![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](https://github.com/wufeifei/cobra/blob/master/LICENSE)
66

7-
当前版本非正式版本,正式版本正在做最后的内测中,建议等正式版本出来后再使用,敬请期待!
87
[![asciicast](https://raw.githubusercontent.com/wufeifei/cobra/master/docs/report_03.jpg)](https://asciinema.org/a/132572)
98

109
## Introduction(介绍)

cobra/parser.py

+6
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ def get_binaryop_params(node): # 当为BinaryOp类型时,分别对left和righ
119119
"""
120120
logger.debug('[AST] Binaryop --> {node}'.format(node=node))
121121
params = []
122+
buffer_ = []
122123

123124
if isinstance(node.left, php.Variable) or isinstance(node.right, php.Variable): # left, right都为变量直接取值
124125
if isinstance(node.left, php.Variable):
@@ -133,6 +134,7 @@ def get_binaryop_params(node): # 当为BinaryOp类型时,分别对left和righ
133134

134135
params = params_left + params_right
135136

137+
params = export_list(params, buffer_)
136138
return params
137139

138140

@@ -178,6 +180,10 @@ def get_expr_name(node): # expr为'expr'中的值
178180
param_lineno = node.lineno
179181
is_re = is_repair(node.name) # 调用了函数,判断调用的函数是否为修复函数
180182

183+
elif isinstance(node, php.BinaryOp): # 当赋值表达式为BinaryOp
184+
param_expr = get_binaryop_params(node)
185+
param_lineno = node.lineno
186+
181187
else:
182188
param_expr = node
183189

0 commit comments

Comments
 (0)