acktick" />
        <pop depth="1" />
      </rule>
      <rule pattern="\\\\">
        <token type="LiteralStringBacktick" />
      </rule>
      <rule pattern="\\`">
        <token type="LiteralStringBacktick" />
      </rule>
      <rule pattern="\$\{">
        <token type="LiteralStringInterpol" />
        <push state="interp-inside" />
      </rule>
      <rule pattern="\$">
        <token type="LiteralStringBacktick" />
      </rule>
      <rule pattern="[^`\\$]+">
        <token type="LiteralStringBacktick" />
      </rule>
    </state>
    <state name="attr">
      <rule pattern="{">
        <token type="Punctuation" />
        <push state="expression" />
      </rule>
      <rule pattern="&#34;.*?&#34;">
        <token type="LiteralString" />
        <pop depth="1" />
      </rule>
      <rule pattern="&#39;.*?&#39;">
        <token type="LiteralString" />
        <pop depth="1" />
      </rule>
      <rule>
        <pop depth="1" />
      </rule>
    </state>
    <state name="interp-inside">
      <rule pattern="\}">
        <token type="LiteralStringInterpol" />
        <pop depth="1" />
      </rule>
      <rule>
        <include state="root" />
      </rule>
    </state>
    <state name="slashstartsregex">
      <rule>
        <include state="commentsandwhitespace" />
      </rule>
      <rule pattern="/(\\.|[^[/\\\n]|\[(\\.|[^\]\\\n])*])+/([gim]+\b|\B)">
        <token type="LiteralStringRegex" />
        <pop depth="1" />
      </rule>
      <rule pattern="(?=/)">
        <token type="Text" />
        <push state="badregex" />
      </rule>
      <rule>
        <pop depth="1" />
      </rule>
    </state>
    <state name="root">
      <rule>
        <include state="jsx" />
      </rule>
      <rule pattern="^(?=\s|/|&lt;!--)">
        <token type="Text" />
        <push state="slashstartsregex" />
      </rule>
      <rule>
        <include state="commentsandwhitespace" />
      </rule>
      <rule pattern="\+\+|--|~|&amp;&amp;|\?|:|\|\||\\(?=\n)|(&lt;&lt;|&gt;&gt;&gt;?|==?|!=?|[-&lt;&gt;+*%&amp;|^/])=?">
        <token type="Operator" />
        <push state="slashstartsregex" />
      </rule>
      <rule pattern="[{(\[;,]">
        <token type="Punctuation" />
        <push state="slashstartsregex" />
      </rule>
      <rule pattern="[})\].]">
        <token type="Punctuation" />
      </rule>
      <rule
        pattern="(for|in|of|while|do|break|return|yield|continue|switch|case|default|if|else|throw|try|catch|finally|new|delete|typeof|instanceof|keyof|asserts|is|infer|await|void|this)\b"
      >
        <token type="Keyword" />
        <push state="slashstartsregex" />
      </rule>
      <rule pattern="(var|let|with|function)\b">
        <token type="KeywordDeclaration" />
        <push state="slashstartsregex" />
      </rule>
      <rule
        pattern="(abstract|async|boolean|class|const|debugger|enum|export|extends|from|get|global|goto|implements|import|interface|namespace|package|private|protected|public|readonly|require|set|static|super|type)\b"
      >
        <token type="KeywordReserved" />
      </rule>
      <rule pattern="(true|false|null|NaN|Infinity|undefined)\b">
        <token type="KeywordConstant" />
      </rule>
      <rule
        pattern="(Array|Boolean|Date|Error|Function|Math|Number|Object|Packages|RegExp|String|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|document|this|window)\b"
      >
        <token type="NameBuiltin" />
      </rule>
      <rule pattern="\b(module)(\s+)(&quot;[\w\./@]+&quot;)(\s+)">
        <bygroups>
          <token type="KeywordReserved" />
          <token type="Text" />
          <token type="NameOther" />
          <token type="Text" />
        </bygroups>
        <push state="slashstartsregex" />
      </rule>
      <rule pattern="\b(string|bool|number|any|never|object|symbol|unique|unknown|bigint)\b">
        <token type="KeywordType" />
      </rule>
      <rule pattern="\b(constructor|declare|interface|as)\b">
        <token type="KeywordReserved" />
      </rule>
      <rule pattern="(super)(\s*)(\([\w,?.$\s]+\s*\))">
        <bygroups>
          <token type="KeywordReserved" />
          <token type="TextWhitespace" />
          <token type="Text" />
        </bygroups>
        <push state="slashstartsregex" />
      </rule>
      <rule pattern="([a-zA-Z_?.$][\w?.$]*)\(\) \{">
        <token type="NameOther" />
        <push state="slashstartsregex" />
      </rule>
      <rule pattern="([\w?.$][\w?.$]*)(\s*:\s*)([\w?.$][\w?.$]*)">
        <bygroups>
          <token type="NameOther" />
          <token type="Text" />
          <token type="KeywordType" />
        </bygroups>
      </rule>
      <rule pattern="[$a-zA-Z_]\w*">
        <token type="NameOther" />
      </rule>
      <rule pattern="[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?">
        <token type="LiteralNumberFloat" />
      </rule>
      <rule pattern="0x[0-9a-fA-F]+">
        <token type="LiteralNumberHex" />
      </rule>
      <rule pattern="[0-9]+">
        <token type="LiteralNumberInteger" />
      </rule>
      <rule pattern="&#34;(\\\\|\\&#34;|[^&#34;])*&#34;">
        <token type="LiteralStringDouble" />
      </rule>
      <rule pattern="&#39;(\\\\|\\&#39;|[^&#39;])*&#39;">
        <token type="LiteralStringSingle" />
      </rule>
      <rule pattern="`">
        <token type="LiteralStringBacktick" />
        <push state="interp" />
      </rule>
      <rule pattern="@\w+">
        <token type="KeywordDeclaration" />
      </rule>
    </state>
  </rules>
</lexer>
