You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
38 KiB
1 line
38 KiB
1 year ago
|
{"version":3,"names":["_xhtml","require","_types","_context","_identifier","_whitespace","_parseError","JsxErrors","ParseErrorEnum","AttributeIsEmpty","MissingClosingTagElement","openingTagName","MissingClosingTagFragment","UnexpectedSequenceExpression","UnexpectedToken","unexpected","HTMLEntity","UnsupportedJsxValue","UnterminatedJsxContent","UnwrappedAdjacentJSXElements","isFragment","object","type","getQualifiedJSXName","name","namespace","property","Error","_default","superClass","JSXParserMixin","jsxReadToken","out","chunkStart","state","pos","length","raise","at","startLoc","ch","input","charCodeAt","start","canStartJSXElement","finishToken","getTokenFromCode","slice","jsxReadEntity","isNewLine","jsxReadNewLine","normalizeCRLF","String","fromCharCode","curLine","lineStart","jsxReadString","quote","Errors","UnterminatedString","startPos","codePointAtPos","radix","codePoint","readInt","undefined","fromCodePoint","count","semi","desc","entity","XHTMLEntities","jsxReadWord","isIdentifierChar","jsxParseIdentifier","node","startNode","match","value","tokenIsKeyword","tokenLabelName","next","finishNode","jsxParseNamespacedName","eat","startNodeAt","jsxParseElementName","newNode","jsxParseAttributeValue","setContext","tc","brace","jsxParseExpressionContainer","j_oTag","expression","parseExprAtom","jsxParseEmptyExpression","lastTokEndLoc","finishNodeAt","jsxParseSpreadChild","parseExpression","j_expr","expect","previousContext","jsxParseAttribute","argument","parseMaybeAssignAllowIn","jsxParseOpeningElementAt","jsxParseOpeningElementAfterName","attributes","push","selfClosing","jsxParseClosingElementAt","jsxParseElementAt","children","openingElement","closingElement","contents","openingFragment","closingFragment","jsxParseElement","newContext","context","refExpressionErrors","parseLiteral","replaceToken","skipSpace","curContext","preserveSpace","code","j_cTag","isIdentifierStart","updateContext","prevType","splice","pop","tokenComesBeforeExpression","exports","default"],"sources":["../../../src/plugins/jsx/index.ts"],"sourcesContent":["import * as charCodes from \"charcodes\";\n\nimport XHTMLEntities from \"./xhtml\";\nimport type Parser from \"../../parser\";\nimport type { ExpressionErrors } from \"../../parser/util\";\nimport {\n tokenComesBeforeExpression,\n tokenIsKeyword,\n tokenLabelName,\n type TokenType,\n tt,\n} from \"../../tokenizer/types\";\nimport type { TokContext } from \"../../tokenizer/context\";\nimport { types as tc } from \"../../tokenizer/context\";\nimport type * as N from \"../../types\";\nimport { isIdentifierChar, isIdentifierStart } from \"../../util/identifier\";\nimport type { Position } from \"../../util/location\";\nimport { isNewLine } from \"../../util/whitespace\";\nimport { Errors, ParseErrorEnum } from \"../../parse-error\";\nimport type { Undone } from \"../../parser/node\";\n\n/* eslint sort-keys: \"error\" */\nconst JsxErrors = ParseErrorEnum`jsx`({\n AttributeIsEmpty:\n \"JSX attributes must only be assigned a non-empty expression.\",\n MissingClosingTagElement: ({ openingTagName }: { openingTagName: string }) =>\n `Expected corresponding JSX closing tag for <${openingTagName}>.`,\n MissingClosingTagFragment: \"Expected corresponding JSX closing tag for <>.\",\n UnexpectedSequenceExpression:\n \"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?\",\n // FIXME: Unify with Errors.UnexpectedToken\n UnexpectedToken: ({\n unexpected,\n HTMLEntity,\n }: {\n unexpected: string;\n HTMLEntity: string;\n }) =>\n `Unexpected token \\`${unexpected}\\`. Did you mean \\`${HTMLEntity}\\` or \\`{'${unexpected}'}\\`?`,\n UnsupportedJsxValue:\n \"JSX value should be either an expression or a quoted JSX text.\",\n UnterminatedJsxContent: \"Unterminated JSX contents.\",\n UnwrappedAdjacentJSXElements:\n \"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?\",\n});\n\n/* eslint-disable sort-keys */\n\nfunction isFragment(object?: N.JSXElement | null): boolean {\
|