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

1 line
52 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"version":3,"names":["isFunction","isStatement","isClassBody","isTSInterfaceBody","SCIENTIFIC_NOTATION","ZERO_DECIMAL_INTEGER","NON_DECIMAL_LITERAL","PURE_ANNOTATION_RE","needsParens","n","Printer","constructor","format","map","inForStatementInitCounter","_printStack","_indent","_indentChar","_indentRepeat","_insideAux","_parenPushNewlineState","_noLineTerminator","_printAuxAfterOnNextUserNode","_printedComments","Set","_endsWithInteger","_endsWithWord","_lastCommentLine","_buf","Buffer","indent","style","charCodeAt","length","generate","ast","print","_maybeAddAuxComment","get","compact","concise","dedent","semicolon","force","_appendChar","_queue","rightBrace","minified","removeLastSemicolon","token","space","_space","hasContent","lastCp","getLastChar","word","str","endsWith","_append","number","Number","isInteger","test","maybeNewline","lastChar","strFirst","tokenChar","char","newline","i","retainLines","getNewlineCount","j","_newline","endsWithCharAndNewline","removeTrailingNewline","exactSource","loc","cb","_catchUp","source","prop","sourceWithOffset","lineOffset","columnOffset","withSource","_maybeAddParen","_maybeIndent","append","_maybeAddParenChar","appendChar","queue","firstChar","queueIndentation","_getIndent","_shouldIndent","parenPushNewlineState","printed","len","cha","chaPost","slice","catchUp","line","count","getCurrentLine","pos","ensureNoLineTerminator","fn","printTerminatorless","node","parent","isLabel","terminatorState","noLineTerminator","trailingCommentsLineOffset","nodeType","type","oldConcise","_compact","printMethod","undefined","ReferenceError","JSON","stringify","name","push","oldInAux","shouldPrintParens","retainFunctionParens","extra","parenthesized","_printLeadingComments","bind","_printTrailingComments","pop","enteredPositionlessNode","_printAuxBeforeComment","_printAuxAfterComment","comment","auxiliaryCommentBefore","_printComment","value","auxiliaryCommentAfter","getPossibleRaw","raw","rawValue","printJoin","nodes","opts","newlineOpts","addNewlines","nextNodeStartLine","separator","statement","_printNewline","iterator","nextNode","start","printAndIndentOnComments","leadingComments","printBlock","body","comments","_getComments","_printComments","printInnerComments","innerComments","printSequence","printList","items","commaSeparator","newLine","startLine","lastCommentLine","offset","leading","trailingComments","skipNewLines","ignore","has","shouldPrintComment","add","isBlockComment","printNewLines","lastCharCode","val","adjustMultilineComment","column","newlineRegex","RegExp","replace","indentSize","getCurrentColumn","repeat","nodeLoc","hasLoc","nodeStartLine","nodeEndLine","end","lastLine","leadingCommentNewline","commentStartLine","commentEndLine","Math","max","min","singleLine","includes","shouldSkipNewline","properties","printAssertions","assertions","Object","assign","prototype","generatorFunctions","Noop"],"sources":["../src/printer.ts"],"sourcesContent":["import Buffer from \"./buffer\";\nimport type { Loc } from \"./buffer\";\nimport * as n from \"./node\";\nimport type * as t from \"@babel/types\";\nimport {\n isFunction,\n isStatement,\n isClassBody,\n isTSInterfaceBody,\n} from \"@babel/types\";\nimport type {\n RecordAndTuplePluginOptions,\n PipelineOperatorPluginOptions,\n} from \"@babel/parser\";\nimport type { Opts as jsescOptions } from \"jsesc\";\n\nimport * as generatorFunctions from \"./generators\";\nimport type SourceMap from \"./source-map\";\nimport * as charCodes from \"charcodes\";\n\nconst SCIENTIFIC_NOTATION = /e/i;\nconst ZERO_DECIMAL_INTEGER = /\\.0+$/;\nconst NON_DECIMAL_LITERAL = /^0[box]/;\nconst PURE_ANNOTATION_RE = /^\\s*[@#]__PURE__\\s*$/;\n\nconst { needsParens } = n;\n\nconst enum COMMENT_TYPE {\n LEADING,\n INNER,\n TRAILING,\n}\n\nconst enum COMMENT_SKIP_NEWLINE {\n DEFAULT,\n SKIP_ALL,\n SKIP_LEADING,\n SKIP_TRAILING,\n}\n\nexport type Format = {\n shouldPrintComment: (comment: string) => boolean;\n retainLines: boolean;\n retainFunctionParens: boolean;\n comments: boolean;\n auxiliaryCommentBefore: string;\n auxiliaryCommentAfter: string;\n compact: boolean | \"auto\";\n minified: boolean;\n concise: boolean;\n indent: {\n adjustMultilineComment: boolean;\n style: string;\n };\n recordAndTupleSyntaxType: RecordAndTuplePluginOptions[\"syntaxType\"];\n jsescOption: jsescOptions;\n jsonCompatibleStrings?: boolean;\n /**\n * For use with the Hack-style pipe operator.\n * Changes what token is used for pipe bodies topic references.\n */\n topicToken?: PipelineOperatorPluginOptions[\"topicToken\"];\n /**\n * @deprecated Removed in Babel 8\n */\n decoratorsBeforeExport?: boolean;\n};\n\ninterface AddNewlinesOptions {\n addNewlines(leading: boolean, node: t.Node): number;\n nextNodeStartLine: number;\n}\n\ninterface PrintSequenceOptions extends Partial<AddNewlinesOptions> {\n statement?: boolean;\n indent?: boolean;\n trailingCommentsLineOffset?: number;\n}\n\ninterface PrintListOptions {\n separator?: (this: Printer) => void;\n statement?: boolean;\n indent?: boolean;\n}\n\ntype PrintJoinOptions = PrintListOptions &\n PrintSequenceOptions & {\n iterator?: (node: t.Node, index: number) => void;\n };\nclass Printer {\n constructor(format: Format, map: SourceMap) {\n this.format = format;\n this._buf = new Buffer(map);\n\n this._indentChar = format.indent.style.charCodeAt(0);\n this._indentRepeat = format.indent.style.length;\n }\n\n declare format: Format;\n inForStatementInitCounter: number = 0;\n\n declare _buf: Buffer;\n _printStack: Array<t.Node> = [];\n _indent: number = 0;\n _indentChar: number = 0;\n _indentRepeat: number = 0;\n _insideAux: boolean = false;\n _parenPushNewlineState: { printed: boolean } | null = null;\n _noLineTerminator: boolean = false;\n _printAuxAfterOnNextUserNode: boolean = false;\n _printedComments = new Set<t.Comment>();\n _endsWithInteger = false;\n _endsWithWord = false;\n _lastCommentLine = 0;\n\n generate(ast: t.Node) {\n this.print(ast);\n this._maybeAddAuxComment();\n\n return this._buf.get();\n }\n\n /**\n * Increment indent size.\n */\n\n indent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent++;\n }\n\n /**\n * Decrement indent size.\n */\n\n dedent(): void {\n if (this.format.compact || this.format.concise) return;\n\n this._indent--;\n }\n\n /**\n * Add a semicolon to the buffer.\n */\n\n semicolon(force: boolean = false): void {\n this._maybeAddAuxComment();\n if (force) {\n this._appendChar(charCodes.semicolon);\n } else {\n this._queue(charCodes.semicolon);\n }\n }\n\n /**\n * Add a right brace to the buffer.\n */\n\n rightBrace(): void {\n if (this.format.minified) {\n this._buf.removeLastSemicolon();\n }\n this.token(\"}\");\n }\n\n /**\n * Add a space to the buffer unless it is compact.\n */\n\n space(force: boolean = false): void {\n if (this.format.compact) return;\n\n if (force) {\n this._space();\n } else if (this._buf.hasContent()) {\n const lastCp = this.getLastChar();\n if (lastCp !== charCodes.space && lastCp !== charCodes.lineFeed) {\n this._space();\n }\n }\n }\n\n /**\n * Writes a token that can't be safely parsed without taking whitespace into account.\n */\n\n word(str: string): void {\n // prevent concatenating words and creating // comment out of division and regex\n if (\n this._endsWithWord ||\n (str.charCodeAt(0) === charCodes.slash && this.endsWith(charCodes.slash))\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._append(str, false);\n\n this._endsWithWord = true;\n }\n\n /**\n * Writes a number token so that we can validate if it is an integer.\n */\n\n number(str: string): void {\n this.word(str);\n\n // Integer tokens need special handling because they cannot have '.'s inserted\n // immediately after them.\n this._endsWithInteger =\n Number.isInteger(+str) &&\n !NON_DECIMAL_LITERAL.test(str) &&\n !SCIENTIFIC_NOTATION.test(str) &&\n !ZERO_DECIMAL_INTEGER.test(str) &&\n str.charCodeAt(str.length - 1) !== charCodes.dot;\n }\n\n /**\n * Writes a simple token.\n */\n\n token(str: string, maybeNewline = false): void {\n // space is mandatory to avoid outputting <!--\n // http://javascript.spec.whatwg.org/#comment-syntax\n const lastChar = this.getLastChar();\n const strFirst = str.charCodeAt(0);\n if (\n (lastChar === charCodes.exclamationMark && str === \"--\") ||\n // Need spaces for operators of the same kind to avoid: `a+++b`\n (strFirst === charCodes.plusSign && lastChar === charCodes.plusSign) ||\n (strFirst === charCodes.dash && lastChar === charCodes.dash) ||\n // Needs spaces to avoid changing '34' to '34.', which would still be a valid number.\n (strFirst === charCodes.dot && this._endsWithInteger)\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._append(str, maybeNewline);\n }\n\n tokenChar(char: number): void {\n // space is mandatory to avoid outputting <!--\n // http://javascript.spec.whatwg.org/#comment-syntax\n const lastChar = this.getLastChar();\n if (\n // Need spaces for operators of the same kind to avoid: `a+++b`\n (char === charCodes.plusSign && lastChar === charCodes.plusSign) ||\n (char === charCodes.dash && lastChar === charCodes.dash) ||\n // Needs spaces to avoid changing '34' to '34.', which would still be a valid number.\n (char === charCodes.dot && this._endsWithInteger)\n ) {\n this._space();\n }\n\n this._maybeAddAuxComment();\n this._appendChar(char);\n }\n\n /**\n * Add a newline (or many newlines), maintaining formatting.\n * This function checks the number of newlines in the queue and subtracts them.\n * It currently has some limitations.\n * @see {Buffer#getNewlineCount}\n */\n newline(i: number = 1, force?: boolean): void {\n if (i <= 0) return;\n\n if (!force) {\n if (this.format.retainLines || this.format.compact) return;\n\n if (this.format.concise) {\n this.space();\n return;\n }\n }\n\n if (i > 2) i = 2; // Max two lines\n\n i -= this._buf.getNewlineCount();\n\n for (let j = 0; j < i; j++) {\n this._newline();\n }\n\n return;\n }\n\n endsWith(char: number): boolean {\n return this.getLastChar() === char;\n }\n\n getLastChar(): number {\n return this._buf.getLastChar();\n }\n\n endsWithCharAndNewline(): number {\n return this._buf.endsWithCharAndNewline();\n }\n\n removeTrailingNewline(): void {\n this._buf.removeTrailingNewline();\n }\n\n exactSource(loc: Loc | undefined, cb: () => void) {\n if (!loc) return cb();\n\n this._catchUp(\"start\", loc);\n\n this._buf.exactSource(loc, cb);\n }\n\n source(prop: \"start\" | \"end\", loc: Loc | undefined): void {\n if (!loc) return;\n\n this._catchUp(prop, loc);\n\n this._buf.source(prop, loc);\n }\n\n sourceWithOffset(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n lineOffset: number,\n columnOffset: number,\n ): void {\n if (!loc) return;\n\n this._catchUp(prop, loc);\n\n this._buf.sourceWithOffset(prop, loc, lineOffset, columnOffset);\n }\n\n withSource(\n prop: \"start\" | \"end\",\n loc: Loc | undefined,\n cb: () => void,\n ): void {\n if (!loc) return cb();\n\n this._catchUp(prop, loc);\n\n this._buf.withSource(prop, loc, cb);\n }\n\n _space(): void {\n this._queue(charCodes.space);\n }\n\n _newline(): void {\n this._queue(charCodes.lineFeed);\n }\n\n _append(str: string, maybeNewline: boolean): void {\n this._maybeAddParen(str);\n this._maybeIndent(str.charCodeAt(0));\n\n this._buf.append(str, maybeNewline);\n\n this._endsWithWord = false;\n this._endsWithInteger = false;\n }\n\n _appendChar(char: number): void {\n this._maybeAddParenChar(char);\n this._maybeIndent(char);\n\n this._buf.appendChar(char);\n\n this._endsWithWord = false;\n this._endsWithInteger = false;\n }\n\n _queue(char: number) {\n this._maybeAddParenChar(char);\n this._maybeIndent(char);\n\n this._buf.queue(char);\n\n this._endsWithWord = false;\n this._endsWithInteger = false;\n }\n\n _maybeIndent(firstChar: number): void {\n // we've got a newline before us so prepend on the indentation\n if (\n this._indent &&\n firstChar !== charCodes.lineFeed &&\n this.endsWith(charCodes.lineFeed)\n ) {\n this._buf.queueIndentation(this._indentChar, this._getIndent());\n }\n }\n\n _shouldIndent(firstChar: number) {\n // we've got a newline before us so prepend on the indentation\n if (\n this._indent &&\n firstChar !== charCodes.lineFeed &&\n this.endsWith(charCodes.lineFeed)\n ) {\n return true;\n }\n }\n\n _maybeAddParenChar(char: number): void {\n // see startTerminatorless() instance method\n const parenPushNewlineState = this._parenPushNewlineState;\n if (!parenPushNewlineState) return;\n\n // This function does two things:\n // - If needed, prints a parenthesis\n // - If the currently printed string removes the need for the paren,\n // it resets the _parenPushNewlineState field.\n // Almost everything removes the need for a paren, except for\n // comments and whitespaces.\n\n if (char === charCodes.space) {\n // Whitespaces only, the parentheses might still be needed.\n return;\n }\n\n // Check for newline or comment.\n if (char !== charCodes.lineFeed) {\n this._parenPushNewlineState = null;\n return;\n }\n\n this.token(\"(\");\n this.indent();\n parenPushNewlineState.printed = true;\n }\n\n _maybeAddParen(str: string): void {\n // see startTerminatorless() instance method\n const parenPushNewlineState = this._parenPushNewlineState;\n if (!parenPushNewlineState) return;\n\n // This function does two things:\n // - If needed, prints a parenthesis\n // - If the currently printed string removes the need for the paren,\n // it resets the _parenPushNewlineState field.\n // Almost everything removes the need for a paren, except for\n // comments and whitespaces.\n\n const len = str.length;\n\n let i;\n for (i = 0; i < len && str.charCodeAt(i) === charCodes.space; i++) continue;\n if (i === len) {\n // Whitespaces only, the parentheses might still be needed.\n return;\n }\n\n // Check for newline or comment.\n const cha = str.charCodeAt(i);\n if (cha !== charCodes.lineFeed) {\n if (\n // This is not a comment (it doesn't start with /)\n cha !== charCodes.slash ||\n // This is not a comment (it's a / operator)\n i + 1 === len\n ) {\n // After a normal token, the parentheses aren't needed anymore\n this._parenPushNewlineState = null;\n return;\n }\n\n const chaPost = str.charCodeAt(i + 1);\n\n if (chaPost === charCodes.asterisk) {\n // This is a block comment\n\n if (PURE_ANNOTATION_RE.test(str.slice(i + 2, len - 2))) {\n // We avoid printing newlines after #__PURE__ comments (we treat\n // then as unary operators), but we must keep the old\n // parenPushNewlineState because, if a newline was forbidden, it is\n // still forbidden after the comment.\n return;\n }\n\n // NOTE: code flow continues from here to after these if/elses\n } else if (chaPost !== charCodes.slash) {\n // This is neither a block comment, nor a line comment.\n // After a normal token, the parentheses aren't needed anymore\n this._parenPushNewlineState = null;\n return;\n }\n }\n\n this.token(\"(\");\n this.indent();\n parenPushNewlineState.printed = true;\n }\n\n catchUp(line: number) {\n if (!this.format.retainLines) return;\n\n // catch up to this nodes newline if we're behind\n const count = line - this._buf.getCurrentLine();\n\n for (let i = 0; i < count; i++) {\n this._newline();\n }\n }\n\n _catchUp(prop: \"start\" | \"end\", loc?: Loc) {\n if (!this.format.retainLines) return;\n\n // catch up to this nodes newline if we're behind\n const pos = loc ? loc[prop] : null;\n if (pos?.line != null) {\n const count = pos.line - this._buf.getCurrentLine();\n\n for (let i = 0; i < count; i++) {\n this._newline();\n }\n }\n }\n\n /**\n * Get the current indent.\n */\n\n _getIndent(): number {\n return this._indentRepeat * this._indent;\n }\n\n ensureNoLineTerminator(fn: () => void) {\n const { _noLineTerminator } = this;\n this._noLineTerminator = true;\n fn();\n this._noLineTerminator = _noLineTerminator;\n }\n\n printTerminatorless(node: t.Node, parent: t.Node, isLabel: boolean) {\n /**\n * Set some state that will be modified if a newline has been inserted before any\n * non-space characters.\n *\n * This is to prevent breaking semantics for terminatorless separator nodes. eg:\n *\n * return foo;\n *\n * returns `foo`. But if we do:\n *\n * return\n * foo;\n *\n * `undefined` will be returned and not `foo` due to the terminator.\n */\n if (isLabel) {\n this.ensureNoLineTerminator(() => {\n this.print(node, parent);\n });\n } else {\n const terminatorState = {\n printed: false,\n };\n this._parenPushNewlineState = terminatorState;\n this.print(node, parent);\n /**\n * Print an ending parentheses if a starting one has been printed.\n */\n if (terminatorState.printed) {\n this.dedent();\n this.newline();\n this.token(\")\");\n }\n }\n }\n\n print(\n node: t.Node | null,\n parent?: t.Node,\n noLineTerminator?: boolean,\n // trailingCommentsLineOffset also used to check if called from printJoin\n // it will be ignored if `noLineTerminator||this._noLineTerminator`\n trailingCommentsLineOffset?: number,\n ) {\n if (!node) return;\n\n const nodeType = node.type;\n const format = this.format;\n\n const oldConcise = format.concise;\n if (\n // @ts-expect-error document _compact AST properties\n node._compact\n ) {\n format.concise = true;\n }\n\n const printMethod =\n this[\n nodeType as Exclude<\n t.Node[\"type\"],\n // removed\n | \"Noop\"\n // renamed\n | t.DeprecatedAliases[\"type\"]\n >\n ];\n if (printMethod === undefined) {\n throw new ReferenceError(\n `unknown node of type ${JSON.stringify(\n nodeType,\n )} with constructor ${JSON.stringify(node.constructor.name)}`,\n );\n }\n\n this._printStack.push(node);\n\n const oldInAux = this._insideAux;\n this._insideAux = node.loc == undefined;\n this._maybeAddAuxComment(this._insideAux && !oldInAux);\n\n let shouldPrintParens = false;\n if (\n format.retainFunctionParens &&\n nodeType === \"FunctionExpression\" &&\n node.extra &&\n node.extra.parenthesized\n ) {\n shouldPrintParens = true;\n } else {\n shouldPrintParens = needsParens(node, parent, this._printStack);\n }\n if (shouldPrintParens) this.token(\"(\");\n\n this._lastCommentLine = 0;\n\n this._printLeadingComments(node, parent);\n\n const loc = nodeType === \"Program\" || nodeType === \"File\" ? null : node.loc;\n\n this.exactSource(loc, printMethod.bind(this, node, parent));\n\n if (noLineTerminator && !this._noLineTerminator) {\n this._noLineTerminator = true;\n this._printTrailingComments(node, parent);\n this._noLineTerminator = false;\n } else {\n this._printTrailingComments(node, parent, trailingCommentsLineOffset);\n }\n\n if (shouldPrintParens) this.token(\")\");\n\n // end\n this._printStack.pop();\n\n format.concise = oldConcise;\n this._insideAux = oldInAux;\n }\n\n _maybeAddAuxComment(enteredPositionlessNode?: boolean) {\n if (enteredPositionlessNode) this._printAuxBeforeComment();\n if (!this._insideAux) this._printAuxAfterComment();\n }\n\n _printAuxBeforeComment() {\n if (this._printAuxAfterOnNextUserNode) return;\n this._printAuxAfterOnNextUserNode = true;\n\n const comment = this.format.auxiliaryCommentBefore;\n if (comment) {\n this._printComment(\n {\n type: \"CommentBlock\",\n value: comment,\n },\n COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n }\n }\n\n _printAuxAfterComment() {\n if (!this._printAuxAfterOnNextUserNode) return;\n this._printAuxAfterOnNextUserNode = false;\n\n const comment = this.format.auxiliaryCommentAfter;\n if (comment) {\n this._printComment(\n {\n type: \"CommentBlock\",\n value: comment,\n },\n COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n }\n }\n\n getPossibleRaw(\n node:\n | t.StringLiteral\n | t.NumericLiteral\n | t.BigIntLiteral\n | t.DecimalLiteral\n | t.DirectiveLiteral\n | t.JSXText,\n ): string | undefined {\n const extra = node.extra;\n if (\n extra &&\n extra.raw != null &&\n extra.rawValue != null &&\n node.value === extra.rawValue\n ) {\n // @ts-expect-error: The extra.raw of these AST node types must be a string\n return extra.raw;\n }\n }\n\n printJoin(\n nodes: Array<t.Node> | undefined | null,\n parent: t.Node,\n opts: PrintJoinOptions = {},\n ) {\n if (!nodes?.length) return;\n\n if (opts.indent) this.indent();\n\n const newlineOpts: AddNewlinesOptions = {\n addNewlines: opts.addNewlines,\n nextNodeStartLine: 0,\n };\n\n const separator = opts.separator ? opts.separator.bind(this) : null;\n\n const len = nodes.length;\n for (let i = 0; i < len; i++) {\n const node = nodes[i];\n if (!node) continue;\n\n if (opts.statement) this._printNewline(i === 0, newlineOpts);\n\n this.print(node, parent, undefined, opts.trailingCommentsLineOffset || 0);\n\n opts.iterator?.(node, i);\n\n if (i < len - 1) separator?.();\n\n if (opts.statement) {\n if (i + 1 === len) {\n this.newline(1);\n } else {\n const nextNode = nodes[i + 1];\n newlineOpts.nextNodeStartLine = nextNode.loc?.start.line || 0;\n\n this._printNewline(true, newlineOpts);\n }\n }\n }\n\n if (opts.indent) this.dedent();\n }\n\n printAndIndentOnComments(node: t.Node, parent: t.Node) {\n const indent = node.leadingComments && node.leadingComments.length > 0;\n if (indent) this.indent();\n this.print(node, parent);\n if (indent) this.dedent();\n }\n\n printBlock(parent: Extract<t.Node, { body: t.Statement }>) {\n const node = parent.body;\n\n if (node.type !== \"EmptyStatement\") {\n this.space();\n }\n\n this.print(node, parent);\n }\n\n _printTrailingComments(node: t.Node, parent?: t.Node, lineOffset?: number) {\n const comments = this._getComments(false, node);\n if (!comments?.length) return;\n this._printComments(\n COMMENT_TYPE.TRAILING,\n comments,\n node,\n parent,\n lineOffset,\n );\n }\n\n _printLeadingComments(node: t.Node, parent: t.Node) {\n const comments = this._getComments(true, node);\n if (!comments?.length) return;\n this._printComments(COMMENT_TYPE.LEADING, comments, node, parent);\n }\n\n printInnerComments(node: t.Node, indent = true) {\n if (!node.innerComments?.length) return;\n if (indent) this.indent();\n this._printComments(COMMENT_TYPE.INNER, node.innerComments, node);\n if (indent) this.dedent();\n }\n\n printSequence(\n nodes: t.Node[],\n parent: t.Node,\n opts: PrintSequenceOptions = {},\n ) {\n opts.statement = true;\n return this.printJoin(nodes, parent, opts);\n }\n\n printList(items: t.Node[], parent: t.Node, opts: PrintListOptions = {}) {\n if (opts.separator == null) {\n opts.separator = commaSeparator;\n }\n\n return this.printJoin(items, parent, opts);\n }\n\n _printNewline(newLine: boolean, opts: AddNewlinesOptions) {\n // Fast path since 'this.newline' does nothing when not tracking lines.\n if (this.format.retainLines || this.format.compact) return;\n\n // Fast path for concise since 'this.newline' just inserts a space when\n // concise formatting is in use.\n if (this.format.concise) {\n this.space();\n return;\n }\n\n if (!newLine) {\n return;\n }\n\n const startLine = opts.nextNodeStartLine;\n const lastCommentLine = this._lastCommentLine;\n if (startLine > 0 && lastCommentLine > 0) {\n const offset = startLine - lastCommentLine;\n if (offset >= 0) {\n this.newline(offset || 1);\n return;\n }\n }\n\n // don't add newlines at the beginning of the file\n if (this._buf.hasContent()) {\n // Here is the logic of the original line wrapping according to the node layout, we are not using it now.\n // We currently add at most one newline to each node in the list, ignoring `opts.addNewlines`.\n\n // let lines = 0;\n // if (!leading) lines++; // always include at least a single line after\n // if (opts.addNewlines) lines += opts.addNewlines(leading, node) || 0;\n\n // const needs = leading ? needsWhitespaceBefore : needsWhitespaceAfter;\n // if (needs(node, parent)) lines++;\n\n // this.newline(Math.min(2, lines));\n\n this.newline(1);\n }\n }\n\n _getComments(leading: boolean, node: t.Node) {\n // Note, we use a boolean flag here instead of passing in the attribute name as it is faster\n // because this is called extremely frequently.\n return (\n (node && (leading ? node.leadingComments : node.trailingComments)) || null\n );\n }\n\n _printComment(comment: t.Comment, skipNewLines: COMMENT_SKIP_NEWLINE) {\n // Some plugins (such as flow-strip-types) use this to mark comments as removed using the AST-root 'comments' property,\n // where they can't manually mutate the AST node comment lists.\n if (comment.ignore) return;\n\n if (this._printedComments.has(comment)) return;\n\n if (!this.format.shouldPrintComment(comment.value)) return;\n\n this._printedComments.add(comment);\n\n const isBlockComment = comment.type === \"CommentBlock\";\n\n // Add a newline before and after a block comment, unless explicitly\n // disallowed\n const printNewLines =\n isBlockComment &&\n skipNewLines !== COMMENT_SKIP_NEWLINE.SKIP_ALL &&\n !this._noLineTerminator;\n\n if (\n printNewLines &&\n this._buf.hasContent() &&\n skipNewLines !== COMMENT_SKIP_NEWLINE.SKIP_LEADING\n ) {\n this.newline(1);\n }\n\n const lastCharCode = this.getLastChar();\n if (\n lastCharCode !== charCodes.leftSquareBracket &&\n lastCharCode !== charCodes.leftCurlyBrace\n ) {\n this.space();\n }\n\n let val;\n if (isBlockComment) {\n val = `/*${comment.value}*/`;\n if (this.format.indent.adjustMultilineComment) {\n const offset = comment.loc?.start.column;\n if (offset) {\n const newlineRegex = new RegExp(\"\\\\n\\\\s{1,\" + offset + \"}\", \"g\");\n val = val.replace(newlineRegex, \"\\n\");\n }\n\n let indentSize = this.format.retainLines\n ? 0\n : this._buf.getCurrentColumn();\n\n if (this._shouldIndent(charCodes.slash) || this.format.retainLines) {\n indentSize += this._getIndent();\n }\n\n val = val.replace(/\\n(?!$)/g, `\\n${\" \".repeat(indentSize)}`);\n }\n } else if (!this._noLineTerminator) {\n val = `//${comment.value}`;\n } else {\n val = `/*${comment.value}*/`;\n }\n\n // Avoid creating //* comments\n if (this.endsWith(charCodes.slash)) this._space();\n\n this.source(\"start\", comment.loc);\n this._append(val, isBlockComment);\n\n if (!isBlockComment && !this._noLineTerminator) {\n this.newline(1, true);\n }\n\n if (printNewLines && skipNewLines !== COMMENT_SKIP_NEWLINE.SKIP_TRAILING) {\n this.newline(1);\n }\n }\n\n _printComments(\n type: COMMENT_TYPE,\n comments: readonly t.Comment[],\n node: t.Node,\n parent?: t.Node,\n lineOffset: number = 0,\n ) {\n {\n const nodeLoc = node.loc;\n const len = comments.length;\n let hasLoc = !!nodeLoc;\n const nodeStartLine = hasLoc ? nodeLoc.start.line : 0;\n const nodeEndLine = hasLoc ? nodeLoc.end.line : 0;\n let lastLine = 0;\n let leadingCommentNewline = 0;\n\n for (let i = 0; i < len; i++) {\n const comment = comments[i];\n\n if (hasLoc && comment.loc && !this._printedComments.has(comment)) {\n const commentStartLine = comment.loc.start.line;\n const commentEndLine = comment.loc.end.line;\n if (type === COMMENT_TYPE.LEADING) {\n let offset = 0;\n if (i === 0) {\n // Because currently we cannot handle blank lines before leading comments,\n // we always wrap before and after multi-line comments.\n if (\n this._buf.hasContent() &&\n (comment.type === \"CommentLine\" ||\n commentStartLine != commentEndLine)\n ) {\n offset = leadingCommentNewline = 1;\n }\n } else {\n offset = commentStartLine - lastLine;\n }\n lastLine = commentEndLine;\n\n this.newline(offset);\n this._printComment(comment, COMMENT_SKIP_NEWLINE.SKIP_ALL);\n\n if (i + 1 === len) {\n this.newline(\n Math.max(nodeStartLine - lastLine, leadingCommentNewline),\n );\n lastLine = nodeStartLine;\n }\n } else if (type === COMMENT_TYPE.INNER) {\n const offset =\n commentStartLine - (i === 0 ? nodeStartLine : lastLine);\n lastLine = commentEndLine;\n\n this.newline(offset);\n this._printComment(comment, COMMENT_SKIP_NEWLINE.SKIP_ALL);\n\n if (i + 1 === len) {\n this.newline(Math.min(1, nodeEndLine - lastLine)); // TODO: Improve here when inner comments processing is stronger\n lastLine = nodeEndLine;\n }\n } else {\n const offset =\n commentStartLine -\n (i === 0 ? nodeEndLine - lineOffset : lastLine);\n lastLine = commentEndLine;\n\n this.newline(offset);\n this._printComment(comment, COMMENT_SKIP_NEWLINE.SKIP_ALL);\n }\n } else {\n hasLoc = false;\n\n if (len === 1) {\n const singleLine = comment.loc\n ? comment.loc.start.line === comment.loc.end.line\n : !comment.value.includes(\"\\n\");\n\n const shouldSkipNewline =\n singleLine &&\n !isStatement(node) &&\n !isClassBody(parent) &&\n !isTSInterfaceBody(parent);\n\n if (type === COMMENT_TYPE.LEADING) {\n this._printComment(\n comment,\n (shouldSkipNewline && node.type !== \"ObjectExpression\") ||\n (singleLine && isFunction(parent, { body: node }))\n ? COMMENT_SKIP_NEWLINE.SKIP_ALL\n : COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n } else if (shouldSkipNewline && type === COMMENT_TYPE.TRAILING) {\n this._printComment(comment, COMMENT_SKIP_NEWLINE.SKIP_ALL);\n } else {\n this._printComment(comment, COMMENT_SKIP_NEWLINE.DEFAULT);\n }\n } else if (\n type === COMMENT_TYPE.INNER &&\n !(node.type === \"ObjectExpression\" && node.properties.length > 1) &&\n node.type !== \"ClassBody\" &&\n node.type !== \"TSInterfaceBody\"\n ) {\n // class X {\n // /*:: a: number*/\n // /*:: b: ?string*/\n // }\n\n this._printComment(\n comment,\n i === 0\n ? COMMENT_SKIP_NEWLINE.SKIP_LEADING\n : i === len - 1\n ? COMMENT_SKIP_NEWLINE.SKIP_TRAILING\n : COMMENT_SKIP_NEWLINE.DEFAULT,\n );\n } else {\n this._printComment(comment, COMMENT_SKIP_NEWLINE.DEFAULT);\n }\n }\n }\n\n if (type === COMMENT_TYPE.TRAILING && hasLoc && lastLine) {\n this._lastCommentLine = lastLine;\n }\n }\n }\n // todo(flow->ts): was Node\n printAssertions(node: Extract<t.Node, { assertions?: t.ImportAttribute[] }>) {\n if (node.assertions?.length) {\n this.space();\n this.word(\"assert\");\n this.space();\n this.token(\"{\");\n this.space();\n this.printList(node.assertions, node);\n this.space();\n this.token(\"}\");\n }\n }\n}\n\n// Expose the node type functions and helpers on the prototype for easy usage.\nObject.assign(Printer.prototype, generatorFunctions);\n\nif (!process.env.BABEL_8_BREAKING) {\n // @ts-ignore(Babel 7 vs Babel 8) Babel 7 has Noop print method\n Printer.prototype.Noop = function Noop(this: Printer) {};\n}\n\ntype GeneratorFunctions = typeof generatorFunctions;\ninterface Printer extends GeneratorFunctions {}\nexport default Printer;\n\nfunction commaSeparator(this: Printer) {\n this.token(\",\");\n this.space();\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AAYA;;;EAXEA,U;EACAC,W;EACAC,W;EACAC;;AAYF,MAAMC,mBAAmB,GAAG,IAA5B;AACA,MAAMC,oBAAoB,GAAG,OAA7B;AACA,MAAMC,mBAAmB,GAAG,SAA5B;AACA,MAAMC,kBAAkB,GAAG,sBAA3B;A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