Update compiler.h

This commit is contained in:
blueloveTH 2022-12-12 18:41:45 +08:00
parent b4e95b1bab
commit e41a525f25

View File

@ -617,17 +617,17 @@ __LISTCOMP:
if(match(TK("]"))){ if(match(TK("]"))){
emitCode(OP_LOAD_NONE); emitCode(OP_LOAD_NONE);
}else{ }else{
EXPR(); EXPR_TUPLE();
consume(TK("]")); consume(TK("]"));
} }
emitCode(OP_BUILD_SLICE); emitCode(OP_BUILD_SLICE);
}else{ }else{
EXPR(); EXPR_TUPLE();
if(match(TK(":"))){ if(match(TK(":"))){
if(match(TK("]"))){ if(match(TK("]"))){
emitCode(OP_LOAD_NONE); emitCode(OP_LOAD_NONE);
}else{ }else{
EXPR(); EXPR_TUPLE();
consume(TK("]")); consume(TK("]"));
} }
emitCode(OP_BUILD_SLICE); emitCode(OP_BUILD_SLICE);