Commit Graph

10 Commits

Author SHA1 Message Date
jinyaohui fbdba6e4da clean pylint 2020-05-22 13:23:13 +08:00
jinyaohui 5a914994ba clean pylint 2020-05-18 16:42:35 +08:00
jinyaohui bcfaff97f9 clean pylint 2020-05-18 10:31:46 +08:00
panyifeng 755ba75deb fix pylint 2020-05-14 14:22:52 +08:00
He Wei 33fa90efc9 Support 'break', 'continue' and 'pass'
To handle 'break' and 'continue' statement, a loop context is pushed
to a stack before we parse the loop body, and pop it after body parsed.
When a 'break', 'continue' statement is encountered, we retrieve current
loop contex from the stack, and let the current block jump to the end
block or header block;

For 'break' statement, we added an extra 'end_block' follow the 'after_block',
because 'after_block' is called from a ContionalJump in 'header_block', it can
not be set as jump target from other place. to support 'break', we let loop
body jump to the 'end_block' at the 'break' point. and 'after_block'
maybe a good place to handle loop 'else' clause in the future.

Handle 'pass' is simple, just bypass it when doing parse.
2020-05-13 12:53:07 +08:00
buxue 437bb8c27c support ellipsis and bool for tensor slice 2020-04-22 15:00:04 +08:00
buxue 7c233a57fa support python func print and != for list with none 2020-04-20 19:55:50 +08:00
buxue 80978cf3cc support operator ** // % for scalar and tensor, and in not in for dict, ang str concat 2020-04-16 17:03:31 +08:00
Wei Luning 73ba399364 remove ge depend in cpu 2020-04-02 19:38:42 +08:00
zhunaipan 930a1fb0a8 initial version
Signed-off-by: leonwanghui <leon.wanghui@huawei.com>
2020-03-27 22:54:54 +08:00