@lezer/javascript
Advanced tools
Comparing version 1.4.6 to 1.4.7
@@ -0,1 +1,7 @@ | ||
## 1.4.7 (2023-08-23) | ||
### Bug fixes | ||
Properly parse hashbang comments. | ||
## 1.4.6 (2023-08-22) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "@lezer/javascript", | ||
"version": "1.4.6", | ||
"version": "1.4.7", | ||
"description": "lezer-based JavaScript grammar", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs", |
@@ -28,3 +28,3 @@ import {styleTags, tags as t} from "@lezer/highlight" | ||
UpdateOp: t.updateOperator, | ||
LineComment: t.lineComment, | ||
"LineComment Hashbang": t.lineComment, | ||
BlockComment: t.blockComment, | ||
@@ -31,0 +31,0 @@ Number: t.number, |
// This file was generated by lezer-generator. You probably shouldn't edit it. | ||
export const | ||
noSemi = 303, | ||
noSemi = 304, | ||
incdec = 1, | ||
incdecPrefix = 2, | ||
insertSemi = 304, | ||
spaces = 306, | ||
newline = 307, | ||
insertSemi = 305, | ||
spaces = 307, | ||
newline = 308, | ||
LineComment = 3, | ||
BlockComment = 4, | ||
Script = 5, | ||
ExportDeclaration = 6, | ||
Star = 8, | ||
VariableName = 10, | ||
String = 11, | ||
Escape = 12, | ||
FunctionDeclaration = 16, | ||
VariableDefinition = 19, | ||
TypeParamList = 21, | ||
TypeDefinition = 22, | ||
Number = 28, | ||
TemplateType = 30, | ||
InterpolationEnd = 31, | ||
templateType = 32, | ||
InterpolationStart = 33, | ||
typeofMemberExpression = 40, | ||
PropertyName = 43, | ||
TemplateString = 45, | ||
templateEscape = 46, | ||
templateExpr = 47, | ||
RegExp = 49, | ||
ArrayExpression = 51, | ||
Property = 57, | ||
PropertyDefinition = 61, | ||
Block = 62, | ||
TypeArgList = 66, | ||
LessThan = 67, | ||
ArgList = 71, | ||
UnaryExpression = 72, | ||
YieldExpression = 76, | ||
AwaitExpression = 78, | ||
ParenthesizedExpression = 80, | ||
ClassExpression = 81, | ||
ClassBody = 83, | ||
MethodDeclaration = 84, | ||
Decorator = 85, | ||
PrivatePropertyName = 88, | ||
PrivatePropertyDefinition = 95, | ||
PropertyDeclaration = 96, | ||
Optional = 99, | ||
TypeAnnotation = 100, | ||
StaticBlock = 102, | ||
FunctionExpression = 103, | ||
ArrowFunction = 104, | ||
ParamList = 106, | ||
ArrayPattern = 107, | ||
ObjectPattern = 108, | ||
PatternProperty = 109, | ||
MemberExpression = 113, | ||
BinaryExpression = 114, | ||
divide = 116, | ||
questionOp = 132, | ||
AssignmentExpression = 134, | ||
JSXElement = 142, | ||
JSXSelfCloseEndTag = 143, | ||
JSXStartTag = 144, | ||
JSXSelfClosingTag = 145, | ||
JSXIdentifier = 146, | ||
JSXLowerIdentifier = 148, | ||
JSXNamespacedName = 149, | ||
JSXMemberExpression = 150, | ||
JSXAttributeValue = 153, | ||
JSXEndTag = 155, | ||
JSXOpenTag = 156, | ||
JSXFragmentTag = 157, | ||
JSXText = 158, | ||
JSXEscape = 159, | ||
JSXStartCloseTag = 160, | ||
JSXCloseTag = 161, | ||
SequenceExpression = 165, | ||
TypeName = 173, | ||
ParamTypeList = 176, | ||
IndexedType = 178, | ||
Label = 180, | ||
ObjectType = 183, | ||
MethodType = 184, | ||
PropertyType = 185, | ||
IndexSignature = 186, | ||
TypePredicate = 189, | ||
ClassDeclaration = 199, | ||
VariableDeclaration = 203, | ||
TypeAliasDeclaration = 207, | ||
InterfaceDeclaration = 208, | ||
EnumDeclaration = 210, | ||
NamespaceDeclaration = 213, | ||
AmbientDeclaration = 216, | ||
ExportGroup = 223, | ||
ImportDeclaration = 226, | ||
ImportGroup = 227, | ||
ForSpec = 230, | ||
ForInSpec = 231, | ||
ForOfSpec = 232, | ||
SingleExpression = 267, | ||
SingleClassItem = 268, | ||
Hashbang = 6, | ||
ExportDeclaration = 7, | ||
Star = 9, | ||
VariableName = 11, | ||
String = 12, | ||
Escape = 13, | ||
FunctionDeclaration = 17, | ||
VariableDefinition = 20, | ||
TypeParamList = 22, | ||
TypeDefinition = 23, | ||
Number = 29, | ||
TemplateType = 31, | ||
InterpolationEnd = 32, | ||
templateType = 33, | ||
InterpolationStart = 34, | ||
typeofMemberExpression = 41, | ||
PropertyName = 44, | ||
TemplateString = 46, | ||
templateEscape = 47, | ||
templateExpr = 48, | ||
RegExp = 50, | ||
ArrayExpression = 52, | ||
Property = 58, | ||
PropertyDefinition = 62, | ||
Block = 63, | ||
TypeArgList = 67, | ||
LessThan = 68, | ||
ArgList = 72, | ||
UnaryExpression = 73, | ||
YieldExpression = 77, | ||
AwaitExpression = 79, | ||
ParenthesizedExpression = 81, | ||
ClassExpression = 82, | ||
ClassBody = 84, | ||
MethodDeclaration = 85, | ||
Decorator = 86, | ||
PrivatePropertyName = 89, | ||
PrivatePropertyDefinition = 96, | ||
PropertyDeclaration = 97, | ||
Optional = 100, | ||
TypeAnnotation = 101, | ||
StaticBlock = 103, | ||
FunctionExpression = 104, | ||
ArrowFunction = 105, | ||
ParamList = 107, | ||
ArrayPattern = 108, | ||
ObjectPattern = 109, | ||
PatternProperty = 110, | ||
MemberExpression = 114, | ||
BinaryExpression = 115, | ||
divide = 117, | ||
questionOp = 133, | ||
AssignmentExpression = 135, | ||
JSXElement = 143, | ||
JSXSelfCloseEndTag = 144, | ||
JSXStartTag = 145, | ||
JSXSelfClosingTag = 146, | ||
JSXIdentifier = 147, | ||
JSXLowerIdentifier = 149, | ||
JSXNamespacedName = 150, | ||
JSXMemberExpression = 151, | ||
JSXAttributeValue = 154, | ||
JSXEndTag = 156, | ||
JSXOpenTag = 157, | ||
JSXFragmentTag = 158, | ||
JSXText = 159, | ||
JSXEscape = 160, | ||
JSXStartCloseTag = 161, | ||
JSXCloseTag = 162, | ||
SequenceExpression = 166, | ||
TypeName = 174, | ||
ParamTypeList = 177, | ||
IndexedType = 179, | ||
Label = 181, | ||
ObjectType = 184, | ||
MethodType = 185, | ||
PropertyType = 186, | ||
IndexSignature = 187, | ||
TypePredicate = 190, | ||
ClassDeclaration = 200, | ||
VariableDeclaration = 204, | ||
TypeAliasDeclaration = 208, | ||
InterfaceDeclaration = 209, | ||
EnumDeclaration = 211, | ||
NamespaceDeclaration = 214, | ||
AmbientDeclaration = 217, | ||
ExportGroup = 224, | ||
ImportDeclaration = 227, | ||
ImportGroup = 228, | ||
ForSpec = 231, | ||
ForInSpec = 232, | ||
ForOfSpec = 233, | ||
SingleExpression = 268, | ||
SingleClassItem = 269, | ||
Dialect_jsx = 0, | ||
Dialect_ts = 1 |
@@ -377,1 +377,10 @@ # Variable declaration | ||
ExpressionStatement(ParenthesizedExpression(ObjectExpression(Property(Star,PropertyDefinition,ParamList,Block))))) | ||
# Hashbang | ||
#!/bin/env node | ||
foo() | ||
==> | ||
Script(Hashbang,ExpressionStatement(CallExpression(VariableName,ArgList))) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
290479
22
1291