avancement planning

This commit is contained in:
2026-05-26 11:58:39 +02:00
parent 619a2b240a
commit 150b97cd2e
4892 changed files with 99214 additions and 429382 deletions
+45 -36
View File
@@ -3,9 +3,10 @@
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.LogicalExpression = exports.BinaryExpression = exports.AssignmentExpression = AssignmentExpression;
exports.LogicalExpression = exports.AssignmentExpression = AssignmentExpression;
exports.AssignmentPattern = AssignmentPattern;
exports.AwaitExpression = AwaitExpression;
exports.BinaryExpression = BinaryExpression;
exports.BindExpression = BindExpression;
exports.CallExpression = CallExpression;
exports.ConditionalExpression = ConditionalExpression;
@@ -43,11 +44,12 @@ function UnaryExpression(node) {
const {
operator
} = node;
if (operator === "void" || operator === "delete" || operator === "typeof" || operator === "throw") {
const firstChar = operator.charCodeAt(0);
if (firstChar >= 97 && firstChar <= 122) {
this.word(operator);
this.space();
} else {
this.token(operator);
this.tokenChar(firstChar);
}
this.print(node.argument);
}
@@ -62,18 +64,18 @@ function DoExpression(node) {
}
function ParenthesizedExpression(node) {
this.tokenChar(40);
const exit = this.enterDelimited();
this.print(node.expression);
exit();
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.print(node.expression, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function UpdateExpression(node) {
if (node.prefix) {
this.token(node.operator);
this.token(node.operator, false, 0, true);
this.print(node.argument);
} else {
this.print(node.argument, true);
this.token(node.operator);
this.token(node.operator, false, 0, true);
}
}
function ConditionalExpression(node) {
@@ -97,19 +99,17 @@ function NewExpression(node, parent) {
return;
}
this.print(node.typeArguments);
{
this.print(node.typeParameters);
if (node.optional) {
this.token("?.");
}
this.print(node.typeParameters);
if (node.optional) {
this.token("?.");
}
if (node.arguments.length === 0 && this.tokenMap && !this.tokenMap.endMatches(node, ")")) {
return;
}
this.tokenChar(40);
const exit = this.enterDelimited();
this.printList(node.arguments, this.shouldPrintTrailingComma(")"));
exit();
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printList(node.arguments, this.shouldPrintTrailingComma(")"), undefined, undefined, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function SequenceExpression(node) {
@@ -129,7 +129,10 @@ function _shouldPrintDecoratorsBeforeExport(node) {
}
function Decorator(node) {
this.tokenChar(64);
this.print(node.expression);
const {
expression
} = node;
this.print(expression);
this.newline();
}
function OptionalMemberExpression(node) {
@@ -163,29 +166,25 @@ function OptionalMemberExpression(node) {
}
function OptionalCallExpression(node) {
this.print(node.callee);
{
this.print(node.typeParameters);
}
this.print(node.typeParameters);
if (node.optional) {
this.token("?.");
}
this.print(node.typeArguments);
this.tokenChar(40);
const exit = this.enterDelimited();
this.printList(node.arguments);
exit();
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printList(node.arguments, undefined, undefined, undefined, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function CallExpression(node) {
this.print(node.callee);
this.print(node.typeArguments);
{
this.print(node.typeParameters);
}
this.print(node.typeParameters);
this.tokenChar(40);
const exit = this.enterDelimited();
this.printList(node.arguments, this.shouldPrintTrailingComma(")"));
exit();
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.printList(node.arguments, this.shouldPrintTrailingComma(")"), undefined, undefined, undefined, true);
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
this.rightParens(node);
}
function Import() {
@@ -234,11 +233,21 @@ function AssignmentPattern(node) {
function AssignmentExpression(node) {
this.print(node.left);
this.space();
if (node.operator === "in" || node.operator === "instanceof") {
this.word(node.operator);
this.token(node.operator, false, 0, true);
this.space();
this.print(node.right);
}
function BinaryExpression(node) {
this.print(node.left);
this.space();
const {
operator
} = node;
if (operator.charCodeAt(0) === 105) {
this.word(operator);
} else {
this.token(node.operator);
this._endsWithDiv = node.operator === "/";
this.token(operator, false, 0, true);
this.setLastChar(operator.charCodeAt(operator.length - 1));
}
this.space();
this.print(node.right);
@@ -258,11 +267,11 @@ function MemberExpression(node) {
computed = true;
}
if (computed) {
const exit = this.enterDelimited();
const oldNoLineTerminatorAfterNode = this.enterDelimited();
this.tokenChar(91);
this.print(node.property);
this.print(node.property, undefined, true);
this.tokenChar(93);
exit();
this._noLineTerminatorAfterNode = oldNoLineTerminatorAfterNode;
} else {
this.tokenChar(46);
this.print(node.property);