mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
break is ok
This commit is contained in:
parent
e73fb2106d
commit
dc997361d5
@ -419,7 +419,7 @@ TEST(pikaMain, for_if_break) {
|
|||||||
/* collect */
|
/* collect */
|
||||||
int a = obj_getInt(pikaMain, (char*)"a");
|
int a = obj_getInt(pikaMain, (char*)"a");
|
||||||
/* assert */
|
/* assert */
|
||||||
EXPECT_EQ(a, 30);
|
EXPECT_EQ(a, 3);
|
||||||
/* deinit */
|
/* deinit */
|
||||||
obj_deinit(pikaMain);
|
obj_deinit(pikaMain);
|
||||||
/* mem check */
|
/* mem check */
|
||||||
|
@ -662,7 +662,8 @@ nextLine:
|
|||||||
int32_t loop_end_addr = asm_getAddrOffsetOfJUM(programCounter);
|
int32_t loop_end_addr = asm_getAddrOffsetOfJUM(programCounter);
|
||||||
/* break */
|
/* break */
|
||||||
if (-998 == jmp) {
|
if (-998 == jmp) {
|
||||||
return lineAddr + gotoNextLine(programCounter + loop_end_addr);
|
loop_end_addr += gotoNextLine(programCounter + loop_end_addr);
|
||||||
|
return lineAddr + loop_end_addr;
|
||||||
}
|
}
|
||||||
if (-997 == jmp) {
|
if (-997 == jmp) {
|
||||||
return lineAddr +
|
return lineAddr +
|
||||||
|
Loading…
x
Reference in New Issue
Block a user