Skip to content

Commit 5b911cd

Browse files
author
Wangdahai
committed
removed chinese annotations
1 parent a1a10b1 commit 5b911cd

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

dist/index.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25341,17 +25341,11 @@
2534125341
}
2534225342
visitComplexExpr(expr) {
2534325343
return {
25344-
// 你可以复用 "Literal",也可以用别的 type 标记
25345-
// 这里保持和 BigInt 的风格一致
2534625344
type: 'Literal',
25347-
// 和 visitBigIntLiteralExpr 类似,这里用一个字段来保存复数内容
25348-
// 比如把它叫做 "complex"
25349-
// expr.value 是一个 PyComplexNumber, 你可以用 toString(), 或者直接存 real/imag
2535025345
complex: {
2535125346
real: expr.value.real,
2535225347
imag: expr.value.imag
2535325348
},
25354-
// 和其它 literal 一样,加上位置信息
2535525349
loc: this.toEstreeLocation(expr),
2535625350
};
2535725351
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/translator.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -612,21 +612,14 @@ export class Translator implements StmtNS.Visitor<BaseNode>, ExprNS.Visitor<Base
612612

613613
visitComplexExpr(expr: ExprNS.Complex): ComplexLiteral {
614614
return {
615-
// 你可以复用 "Literal",也可以用别的 type 标记
616-
// 这里保持和 BigInt 的风格一致
617615
type: 'Literal',
618616

619-
// 和 visitBigIntLiteralExpr 类似,这里用一个字段来保存复数内容
620-
// 比如把它叫做 "complex"
621-
// expr.value 是一个 PyComplexNumber, 你可以用 toString(), 或者直接存 real/imag
622617
complex: {
623618
real: expr.value.real,
624619
imag: expr.value.imag
625620
},
626621

627-
// 和其它 literal 一样,加上位置信息
628622
loc: this.toEstreeLocation(expr),
629623
}
630624
}
631-
632-
}
625+
}

0 commit comments

Comments
 (0)