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("]"))){
emitCode(OP_LOAD_NONE);
}else{
EXPR();
EXPR_TUPLE();
consume(TK("]"));
}
emitCode(OP_BUILD_SLICE);
}else{
EXPR();
EXPR_TUPLE();
if(match(TK(":"))){
if(match(TK("]"))){
emitCode(OP_LOAD_NONE);
}else{
EXPR();
EXPR_TUPLE();
consume(TK("]"));
}
emitCode(OP_BUILD_SLICE);