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

Commit

Permalink
Merge pull request #530 from wufeifei/develop
Browse files Browse the repository at this point in the history
v2.0.0-alpha
  • Loading branch information
FeeiCN committed Sep 4, 2017
2 parents 58ce500 + ffefb27 commit e3e29b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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(介绍)
Expand Down
6 changes: 6 additions & 0 deletions cobra/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -133,6 +134,7 @@ def get_binaryop_params(node): # 当为BinaryOp类型时,分别对left和righ

params = params_left + params_right

params = export_list(params, buffer_)
return params


Expand Down Expand Up @@ -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

Expand Down

0 comments on commit e3e29b4

Please sign in to comment.