Skip to content

Commit

Permalink
不要修改原始数据
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Nov 26, 2024
1 parent 9506001 commit dfab15e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/ecaCompiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ export class Exp {
this.args.push(new Exp(arg));
}
if ('op_arg' in json) {
let enables = json.op_arg_enable as boolean[];
for (let op_arg of json.op_arg as y3.json.JObject[]) {
let enable = enables?.shift();
if (op_arg === null || enable === false) {
let enables = json.op_arg_enable as boolean[] | undefined;
let op_args = json.op_arg as y3.json.JObject[];
for (let i = 0; i < op_args.length; i++) {
let enable = enables?.[i];
if (op_args[i] === null || enable === false) {
this.args.push(null);
} else {
this.args.push(new Exp(op_arg));
this.args.push(new Exp(op_args[i]));
}
}
}
Expand Down

0 comments on commit dfab15e

Please sign in to comment.