challenge-algorithms-v2.0-s.../node_modules/@babel/generator/lib/node/parentheses.js.map

1 line
24 KiB
Plaintext

{"version":3,"names":["isArrayTypeAnnotation","isArrowFunctionExpression","isAssignmentExpression","isAwaitExpression","isBinary","isBinaryExpression","isUpdateExpression","isCallExpression","isClass","isClassExpression","isConditional","isConditionalExpression","isExportDeclaration","isExportDefaultDeclaration","isExpressionStatement","isFor","isForInStatement","isForOfStatement","isForStatement","isFunctionExpression","isIfStatement","isIndexedAccessType","isIntersectionTypeAnnotation","isLogicalExpression","isMemberExpression","isNewExpression","isNullableTypeAnnotation","isObjectPattern","isOptionalCallExpression","isOptionalMemberExpression","isReturnStatement","isSequenceExpression","isSwitchStatement","isTSArrayType","isTSAsExpression","isTSInstantiationExpression","isTSIntersectionType","isTSNonNullExpression","isTSOptionalType","isTSRestType","isTSTypeAssertion","isTSUnionType","isTaggedTemplateExpression","isThrowStatement","isTypeAnnotation","isUnaryLike","isUnionTypeAnnotation","isVariableDeclarator","isWhileStatement","isYieldExpression","PRECEDENCE","in","instanceof","isClassExtendsClause","node","parent","superClass","hasPostfixPart","object","callee","tag","NullableTypeAnnotation","FunctionTypeAnnotation","printStack","length","UpdateExpression","ObjectExpression","isFirstInContext","DoExpression","async","Binary","operator","left","parentOp","parentPos","nodeOp","nodePos","right","UnionTypeAnnotation","OptionalIndexedAccessType","objectType","TSAsExpression","TSTypeAssertion","TSUnionType","TSInferType","TSInstantiationExpression","typeParameters","BinaryExpression","SequenceExpression","test","discriminant","expression","YieldExpression","ClassExpression","UnaryLike","FunctionExpression","ArrowFunctionExpression","ConditionalExpression","OptionalMemberExpression","AssignmentExpression","LogicalExpression","Identifier","extra","parenthesized","id","name","isFollowedByBracket","computed","optional","checkParam","expressionStatement","arrowBody","exportDefault","forHead","forInHead","forOfHead","i","declaration","body","init","expressions","prefix"],"sources":["../../src/node/parentheses.ts"],"sourcesContent":["import {\n isArrayTypeAnnotation,\n isArrowFunctionExpression,\n isAssignmentExpression,\n isAwaitExpression,\n isBinary,\n isBinaryExpression,\n isUpdateExpression,\n isCallExpression,\n isClass,\n isClassExpression,\n isConditional,\n isConditionalExpression,\n isExportDeclaration,\n isExportDefaultDeclaration,\n isExpressionStatement,\n isFor,\n isForInStatement,\n isForOfStatement,\n isForStatement,\n isFunctionExpression,\n isIfStatement,\n isIndexedAccessType,\n isIntersectionTypeAnnotation,\n isLogicalExpression,\n isMemberExpression,\n isNewExpression,\n isNullableTypeAnnotation,\n isObjectPattern,\n isOptionalCallExpression,\n isOptionalMemberExpression,\n isReturnStatement,\n isSequenceExpression,\n isSwitchStatement,\n isTSArrayType,\n isTSAsExpression,\n isTSInstantiationExpression,\n isTSIntersectionType,\n isTSNonNullExpression,\n isTSOptionalType,\n isTSRestType,\n isTSTypeAssertion,\n isTSUnionType,\n isTaggedTemplateExpression,\n isThrowStatement,\n isTypeAnnotation,\n isUnaryLike,\n isUnionTypeAnnotation,\n isVariableDeclarator,\n isWhileStatement,\n isYieldExpression,\n} from \"@babel/types\";\nimport type * as t from \"@babel/types\";\nconst PRECEDENCE = {\n \"||\": 0,\n \"??\": 0,\n \"|>\": 0,\n \"&&\": 1,\n \"|\": 2,\n \"^\": 3,\n \"&\": 4,\n \"==\": 5,\n \"===\": 5,\n \"!=\": 5,\n \"!==\": 5,\n \"<\": 6,\n \">\": 6,\n \"<=\": 6,\n \">=\": 6,\n in: 6,\n instanceof: 6,\n \">>\": 7,\n \"<<\": 7,\n \">>>\": 7,\n \"+\": 8,\n \"-\": 8,\n \"*\": 9,\n \"/\": 9,\n \"%\": 9,\n \"**\": 10,\n};\n\nconst enum CheckParam {\n expressionStatement = 1 << 0,\n arrowBody = 1 << 1,\n exportDefault = 1 << 2,\n forHead = 1 << 3,\n forInHead = 1 << 4,\n forOfHead = 1 << 5,\n}\n\nconst isClassExtendsClause = (\n node: t.Node,\n parent: t.Node,\n): parent is t.Class => isClass(parent, { superClass: node });\n\nconst hasPostfixPart = (node: t.Node, parent: t.Node) =>\n ((isMemberExpression(parent) || isOptionalMemberExpression(parent)) &&\n parent.object === node) ||\n ((isCallExpression(parent) ||\n isOptionalCallExpression(parent) ||\n isNewExpression(parent)) &&\n parent.callee === node) ||\n (isTaggedTemplateExpression(parent) && parent.tag === node) ||\n isTSNonNullExpression(parent);\n\nexport function NullableTypeAnnotation(\n node: t.NullableTypeAnnotation,\n parent: t.Node,\n): boolean {\n return isArrayTypeAnnotation(parent);\n}\n\nexport function FunctionTypeAnnotation(\n node: t.FunctionTypeAnnotation,\n parent: t.Node,\n printStack: Array<t.Node>,\n): boolean {\n if (printStack.length < 3) return;\n\n return (\n // (() => A) | (() => B)\n isUnionTypeAnnotation(parent) ||\n // (() => A) & (() => B)\n isIntersectionTypeAnnotation(parent) ||\n // (() => A)[]\n isArrayTypeAnnotation(parent) ||\n // <T>(A: T): (T => T[]) => B => [A, B]\n (isTypeAnnotation(parent) &&\n // Check grandparent\n isArrowFunctionExpression(printStack[printStack.length - 3]))\n );\n}\n\nexport function UpdateExpression(\n node: t.UpdateExpression,\n parent: t.Node,\n): boolean {\n return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent);\n}\n\nexport function ObjectExpression(\n node: t.ObjectExpression,\n parent: t.Node,\n printStack: Array<t.Node>,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.arrowBody,\n );\n}\n\nexport function DoExpression(\n node: t.DoExpression,\n parent: t.Node,\n printStack: Array<t.Node>,\n): boolean {\n // `async do` can start an expression statement\n return (\n !node.async && isFirstInContext(printStack, CheckParam.expressionStatement)\n );\n}\n\nexport function Binary(node: t.BinaryExpression, parent: t.Node): boolean {\n if (\n node.operator === \"**\" &&\n isBinaryExpression(parent, { operator: \"**\" })\n ) {\n return parent.left === node;\n }\n\n if (isClassExtendsClause(node, parent)) {\n return true;\n }\n\n if (\n hasPostfixPart(node, parent) ||\n isUnaryLike(parent) ||\n isAwaitExpression(parent)\n ) {\n return true;\n }\n\n if (isBinary(parent)) {\n const parentOp = parent.operator;\n const parentPos = PRECEDENCE[parentOp];\n\n const nodeOp = node.operator;\n const nodePos = PRECEDENCE[nodeOp];\n\n if (\n // Logical expressions with the same precedence don't need parens.\n (parentPos === nodePos &&\n parent.right === node &&\n !isLogicalExpression(parent)) ||\n parentPos > nodePos\n ) {\n return true;\n }\n }\n}\n\nexport function UnionTypeAnnotation(\n node: t.UnionTypeAnnotation,\n parent: t.Node,\n): boolean {\n return (\n isArrayTypeAnnotation(parent) ||\n isNullableTypeAnnotation(parent) ||\n isIntersectionTypeAnnotation(parent) ||\n isUnionTypeAnnotation(parent)\n );\n}\n\nexport { UnionTypeAnnotation as IntersectionTypeAnnotation };\n\nexport function OptionalIndexedAccessType(\n node: t.OptionalIndexedAccessType,\n parent: t.Node,\n): boolean {\n return isIndexedAccessType(parent, { objectType: node });\n}\n\nexport function TSAsExpression() {\n return true;\n}\n\nexport function TSTypeAssertion() {\n return true;\n}\n\nexport function TSUnionType(node: t.TSUnionType, parent: t.Node): boolean {\n return (\n isTSArrayType(parent) ||\n isTSOptionalType(parent) ||\n isTSIntersectionType(parent) ||\n isTSUnionType(parent) ||\n isTSRestType(parent)\n );\n}\n\nexport { TSUnionType as TSIntersectionType };\n\nexport function TSInferType(node: t.TSInferType, parent: t.Node): boolean {\n return isTSArrayType(parent) || isTSOptionalType(parent);\n}\n\nexport function TSInstantiationExpression(\n node: t.TSInstantiationExpression,\n parent: t.Node,\n) {\n return (\n (isCallExpression(parent) ||\n isOptionalCallExpression(parent) ||\n isNewExpression(parent) ||\n isTSInstantiationExpression(parent)) &&\n !!parent.typeParameters\n );\n}\n\nexport function BinaryExpression(\n node: t.BinaryExpression,\n parent: t.Node,\n): boolean {\n // let i = (1 in []);\n // for ((1 in []);;);\n return (\n node.operator === \"in\" && (isVariableDeclarator(parent) || isFor(parent))\n );\n}\n\nexport function SequenceExpression(\n node: t.SequenceExpression,\n parent: t.Node,\n): boolean {\n if (\n // Although parentheses wouldn\"t hurt around sequence\n // expressions in the head of for loops, traditional style\n // dictates that e.g. i++, j++ should not be wrapped with\n // parentheses.\n isForStatement(parent) ||\n isThrowStatement(parent) ||\n isReturnStatement(parent) ||\n (isIfStatement(parent) && parent.test === node) ||\n (isWhileStatement(parent) && parent.test === node) ||\n (isForInStatement(parent) && parent.right === node) ||\n (isSwitchStatement(parent) && parent.discriminant === node) ||\n (isExpressionStatement(parent) && parent.expression === node)\n ) {\n return false;\n }\n\n // Otherwise err on the side of overparenthesization, adding\n // explicit exceptions above if this proves overzealous.\n return true;\n}\n\nexport function YieldExpression(\n node: t.YieldExpression,\n parent: t.Node,\n): boolean {\n return (\n isBinary(parent) ||\n isUnaryLike(parent) ||\n hasPostfixPart(node, parent) ||\n (isAwaitExpression(parent) && isYieldExpression(node)) ||\n (isConditionalExpression(parent) && node === parent.test) ||\n isClassExtendsClause(node, parent)\n );\n}\n\nexport { YieldExpression as AwaitExpression };\n\nexport function ClassExpression(\n node: t.ClassExpression,\n parent: t.Node,\n printStack: Array<t.Node>,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.exportDefault,\n );\n}\n\nexport function UnaryLike(\n node:\n | t.UnaryLike\n | t.ArrowFunctionExpression\n | t.ConditionalExpression\n | t.AssignmentExpression,\n parent: t.Node,\n): boolean {\n return (\n hasPostfixPart(node, parent) ||\n isBinaryExpression(parent, { operator: \"**\", left: node }) ||\n isClassExtendsClause(node, parent)\n );\n}\n\nexport function FunctionExpression(\n node: t.FunctionExpression,\n parent: t.Node,\n printStack: Array<t.Node>,\n): boolean {\n return isFirstInContext(\n printStack,\n CheckParam.expressionStatement | CheckParam.exportDefault,\n );\n}\n\nexport function ArrowFunctionExpression(\n node: t.ArrowFunctionExpression,\n parent: t.Node,\n): boolean {\n return isExportDeclaration(parent) || ConditionalExpression(node, parent);\n}\n\nexport function ConditionalExpression(\n node:\n | t.ConditionalExpression\n | t.ArrowFunctionExpression\n | t.AssignmentExpression,\n parent?: t.Node,\n): boolean {\n if (\n isUnaryLike(parent) ||\n isBinary(parent) ||\n isConditionalExpression(parent, { test: node }) ||\n isAwaitExpression(parent) ||\n isTSTypeAssertion(parent) ||\n isTSAsExpression(parent)\n ) {\n return true;\n }\n\n return UnaryLike(node, parent);\n}\n\nexport function OptionalMemberExpression(\n node: t.OptionalMemberExpression,\n parent: t.Node,\n): boolean {\n return (\n isCallExpression(parent, { callee: node }) ||\n isMemberExpression(parent, { object: node })\n );\n}\n\nexport { OptionalMemberExpression as OptionalCallExpression };\n\nexport function AssignmentExpression(\n node: t.AssignmentExpression,\n parent: t.Node,\n): boolean {\n if (isObjectPattern(node.left)) {\n return true;\n } else {\n return ConditionalExpression(node, parent);\n }\n}\n\nexport function LogicalExpression(\n node: t.LogicalExpression,\n parent: t.Node,\n): boolean {\n switch (node.operator) {\n case \"||\":\n if (!isLogicalExpression(parent)) return false;\n return parent.operator === \"??\" || parent.operator === \"&&\";\n case \"&&\":\n return isLogicalExpression(parent, { operator: \"??\" });\n case \"??\":\n return isLogicalExpression(parent) && parent.operator !== \"??\";\n }\n}\n\nexport function Identifier(\n node: t.Identifier,\n parent: t.Node,\n printStack: Array<t.Node>,\n): boolean {\n // 13.15.2 AssignmentExpression RS: Evaluation\n // (fn) = function () {};\n if (\n node.extra?.parenthesized &&\n isAssignmentExpression(parent, { left: node }) &&\n (isFunctionExpression(parent.right) || isClassExpression(parent.right)) &&\n parent.right.id == null\n ) {\n return true;\n }\n // Non-strict code allows the identifier `let`, but it cannot occur as-is in\n // certain contexts to avoid ambiguity with contextual keyword `let`.\n if (node.name === \"let\") {\n // Some contexts only forbid `let [`, so check if the next token would\n // be the left bracket of a computed member expression.\n const isFollowedByBracket =\n isMemberExpression(parent, {\n object: node,\n computed: true,\n }) ||\n isOptionalMemberExpression(parent, {\n object: node,\n computed: true,\n optional: false,\n });\n return isFirstInContext(\n printStack,\n isFollowedByBracket\n ? CheckParam.expressionStatement |\n CheckParam.forHead |\n CheckParam.forInHead |\n CheckParam.forOfHead\n : CheckParam.forOfHead,\n );\n }\n\n // ECMAScript specifically forbids a for-of loop from starting with the\n // token sequence `for (async of`, because it would be ambiguous with\n // `for (async of => {};;)`, so we need to add extra parentheses.\n //\n // If the parent is a for-await-of loop (i.e. parent.await === true), the\n // parentheses aren't strictly needed, but we add them anyway because\n // some tools (including earlier Babel versions) can't parse\n // `for await (async of [])` without them.\n return (\n node.name === \"async\" && isForOfStatement(parent) && node === parent.left\n );\n}\n\n// Walk up the print stack to determine if our node can come first\n// in a particular context.\nfunction isFirstInContext(\n printStack: Array<t.Node>,\n checkParam: CheckParam,\n): boolean {\n const expressionStatement = checkParam & CheckParam.expressionStatement;\n const arrowBody = checkParam & CheckParam.arrowBody;\n const exportDefault = checkParam & CheckParam.exportDefault;\n const forHead = checkParam & CheckParam.forHead;\n const forInHead = checkParam & CheckParam.forInHead;\n const forOfHead = checkParam & CheckParam.forOfHead;\n\n let i = printStack.length - 1;\n if (i <= 0) return;\n let node = printStack[i];\n i--;\n let parent = printStack[i];\n while (i >= 0) {\n if (\n (expressionStatement &&\n isExpressionStatement(parent, { expression: node })) ||\n (exportDefault &&\n isExportDefaultDeclaration(parent, { declaration: node })) ||\n (arrowBody && isArrowFunctionExpression(parent, { body: node })) ||\n (forHead && isForStatement(parent, { init: node })) ||\n (forInHead && isForInStatement(parent, { left: node })) ||\n (forOfHead && isForOfStatement(parent, { left: node }))\n ) {\n return true;\n }\n\n if (\n i > 0 &&\n ((hasPostfixPart(node, parent) && !isNewExpression(parent)) ||\n (isSequenceExpression(parent) && parent.expressions[0] === node) ||\n (isUpdateExpression(parent) && !parent.prefix) ||\n isConditional(parent, { test: node }) ||\n isBinary(parent, { left: node }) ||\n isAssignmentExpression(parent, { left: node }))\n ) {\n node = parent;\n i--;\n parent = printStack[i];\n } else {\n return false;\n }\n }\n\n return false;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;EACEA,qB;EACAC,yB;EACAC,sB;EACAC,iB;EACAC,Q;EACAC,kB;EACAC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