application/javascript;application/x-javascript;text/x-javascript;text/javascript;text/x-js
*.js;*.mjs
//
/*
*/
.js
(?!\N{U+2E2F})[\p{L}\p{Nl}\N{U+1885}-\N{U+1886}\N{U+2118}\N{U+212E}\N{U+309B}-\N{U+309C}\p{Mn}\p{Mc}\p{Nd}\p{Pc}\N{U+00B7}\N{U+0387}\N{U+1369}-\N{U+1371}\N{U+19DA}$\N{U+200C}\N{U+200D}]
(\.[\s\n\r]*[\w]+)[\s\n\r]*(?=\(.*\))
\\u (?: [0-9a-fA-F]{4} | { [0-9a-fA-F]{1,} } )
\%{def:unicode-id-start} | [$_] | \%{unicode-escape}
\%{def:unicode-id-continue} | [$\N{U+200C}\N{U+200D}]
\%{identifier-char} | \%{unicode-escape}
\%{identifier-start} \%{identifier-part}*
(?<! \%{identifier-char} ) (?= \%{identifier-start} )
(?<! \%{identifier-char} )
(?! \%{identifier-char} )
[\t\N{U+000B}\f \N{U+00A0}\N{U+FEFF}\p{Zs}]
[^\t\N{U+000B}\f \N{U+00A0}\N{U+FEFF}\p{Zs}\n\r\N{U+2028}\N{U+2029}]
(?= \%{not-whitespace} )
; | \%{before-next-token}
\%{statement-end} | $
\*
\.\.\.
\.\.\.
(?<! \%{identifier-char} | \. )
(?! \%{identifier-part} | \. )
\%{keyword-start} as \%{keyword-end}
\%{keyword-start} async \%{keyword-end}
\%{keyword-start} await \%{keyword-end}
\%{keyword-start} break \%{keyword-end}
\%{keyword-start} case \%{keyword-end}
\%{keyword-start} catch \%{keyword-end}
\%{keyword-start} class \%{keyword-end}
\%{keyword-start} const \%{keyword-end}
\%{keyword-start} continue \%{keyword-end}
\%{keyword-start} debugger \%{keyword-end}
\%{keyword-start} default \%{keyword-end}
\%{keyword-start} delete \%{keyword-end}
\%{keyword-start} do \%{keyword-end}
\%{keyword-start} else \%{keyword-end}
\%{keyword-start} export \%{keyword-end}
\%{keyword-start} extends \%{keyword-end}
\%{keyword-start} false \%{keyword-end}
\%{keyword-start} finally \%{keyword-end}
\%{keyword-start} for \%{keyword-end}
\%{keyword-start} from \%{keyword-end}
\%{keyword-start} function \%{keyword-end}
\%{keyword-start} get \%{keyword-end}
\%{keyword-start} if \%{keyword-end}
\%{keyword-start} import \%{keyword-end}
\%{keyword-start} in \%{keyword-end}
\%{keyword-start} instanceof \%{keyword-end}
\%{keyword-start} let \%{keyword-end}
\%{keyword-start} meta \%{keyword-end}
\%{keyword-start} new \%{keyword-end}
\%{keyword-start} null \%{keyword-end}
\%{keyword-start} of \%{keyword-end}
\%{keyword-start} return \%{keyword-end}
\%{keyword-start} set \%{keyword-end}
\%{keyword-start} static \%{keyword-end}
\%{keyword-start} super \%{keyword-end}
\%{keyword-start} switch \%{keyword-end}
\%{keyword-start} target \%{keyword-end}
\%{keyword-start} this \%{keyword-end}
\%{keyword-start} throw \%{keyword-end}
\%{keyword-start} true \%{keyword-end}
\%{keyword-start} try \%{keyword-end}
\%{keyword-start} typeof \%{keyword-end}
\%{keyword-start} var \%{keyword-end}
\%{keyword-start} void \%{keyword-end}
\%{keyword-start} while \%{keyword-end}
\%{keyword-start} with \%{keyword-end}
\%{keyword-start} yield \%{keyword-end}
(?: \%{async-keyword} \%{optional-whitespace-or-comments} )?
\%{function-keyword}
# get property() / set property()
(?: \%{js:get-keyword} | \%{js:set-keyword} )
(?=
\%{js:optional-whitespace-or-comments}
\%{js:identifier-start}
) |
# async method() / async * generator()
\%{js:async-keyword}
(?=
\%{js:optional-whitespace-or-comments}
(?: \%{js:identifier-start} | \%{js:generator-modifier} )
) |
# * generator()
(?= \%{js:generator-modifier} )
(?=\*/)
\%{def:always-match}
\%{keyword-start}
\%{keyword-end}
await
break
case
catch
class
const
continue
debugger
default
delete
do
else
export
extends
finally
for
function
if
import
instanceof
in
new
return
super
switch
this
throw
try
typeof
var
void
while
with
yield
\%{keyword-start}
\%{keyword-end}
let
static
\%{keyword-start}
\%{keyword-end}
enum
\%{keyword-start}
\%{keyword-end}
implements
interface
package
private
protected
public
\%{identifier}
\%{identifier-container-start}
\%{def:always-match}
\%{identifier-container-start}
\%{def:always-match}
\%{identifier-container-start}
\%{def:always-match}
\%{identifier-container-start}
\%{def:always-match}
\%{before-next-token}
\%{before-next-token}
=
\%{before-next-token}
\%{before-next-token}
\%{before-next-token}
\%{rest-syntax}
\%{before-next-token}
\%{before-next-token}
\%{spread-syntax}
\%{before-next-token}
\%{before-next-token}
\%{generator-modifier}
\%{before-next-token}
\%{before-next-token}
\[
]
\%{before-next-token}
\%{before-next-token}
,
\%{before-next-token}
:
\%{before-next-token}
\%{before-next-token}
\%{before-next-token}
{
}
\%{before-next-token}
\%{before-next-token}
,
\%{before-next-token}
\%{before-next-token}
\%{before-next-token}
\%{before-next-token}
\%{before-next-token}