Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tree-sitter-javascript

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-sitter-javascript - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

benchmarks/jquery.js

1746

grammar.json
{
"name": "javascript",
"ubiquitous": [
"comment",
"_line_break"
{
"type": "SYMBOL",
"name": "comment"
},
{
"type": "SYMBOL",
"name": "_line_break"
},
{
"type": "PATTERN",
"value": "[ \\t\\r]"
}
],
"separators": [
" ",
"\t",
"\r"
],
"rules": {

@@ -45,2 +50,10 @@ "program": {

"type": "SYMBOL",
"name": "while_statement"
},
{
"type": "SYMBOL",
"name": "do_statement"
},
{
"type": "SYMBOL",
"name": "break_statement"

@@ -58,2 +71,14 @@ },

"type": "SYMBOL",
"name": "throw_statement"
},
{
"type": "SYMBOL",
"name": "try_statement"
},
{
"type": "SYMBOL",
"name": "delete_statement"
},
{
"type": "SYMBOL",
"name": "var_declaration"

@@ -67,4 +92,7 @@ }

{
"type": "SYMBOL",
"name": "expression"
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
},

@@ -94,16 +122,29 @@ {

{
"type": "STRING",
"value": "("
"type": "SYMBOL",
"name": "_paren_expression"
},
{
"type": "SYMBOL",
"name": "expression"
"name": "statement"
},
{
"type": "STRING",
"value": ")"
},
{
"type": "SYMBOL",
"name": "statement"
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "else"
},
{
"type": "SYMBOL",
"name": "statement"
}
]
},
{
"type": "BLANK"
}
]
}

@@ -238,4 +279,31 @@ ]

{
"type": "SYMBOL",
"name": "expression"
"type": "SEQ",
"members": [
{
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
},
{
"type": "REPEAT",
"value": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
}
]
}
}
]
},

@@ -255,4 +323,7 @@ {

{
"type": "SYMBOL",
"name": "expression"
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
},

@@ -272,4 +343,7 @@ {

{
"type": "SYMBOL",
"name": "expression"
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
},

@@ -336,2 +410,40 @@ {

},
"while_statement": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "while"
},
{
"type": "SYMBOL",
"name": "_paren_expression"
},
{
"type": "SYMBOL",
"name": "statement"
}
]
},
"do_statement": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "do"
},
{
"type": "SYMBOL",
"name": "statement_block"
},
{
"type": "KEYWORD",
"value": "while"
},
{
"type": "SYMBOL",
"name": "_paren_expression"
}
]
},
"return_statement": {

@@ -371,2 +483,37 @@ "type": "SEQ",

},
"delete_statement": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "delete"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "member_access"
},
{
"type": "SYMBOL",
"name": "subscript_access"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ";"
},
{
"type": "SYMBOL",
"name": "_line_break"
}
]
}
]
},
"var_declaration": {

@@ -380,19 +527,33 @@ "type": "SEQ",

{
"type": "CHOICE",
"type": "SEQ",
"members": [
{
"type": "BLANK"
"type": "ERROR",
"value": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "var_assignment"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SEQ",
"type": "REPEAT",
"value": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "ERROR",
"value": {
"type": "CHOICE",
"members": [

@@ -404,52 +565,111 @@ {

{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "expression"
"name": "var_assignment"
}
]
}
]
}
]
}
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": ";"
},
{
"type": "SYMBOL",
"name": "_line_break"
}
]
}
]
},
"var_assignment": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
},
"try_statement": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "try"
},
{
"type": "SYMBOL",
"name": "statement_block"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "catch"
},
{
"type": "BLANK"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "finally"
},
{
"type": "BLANK"
}
]
}
]
},
"catch": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "catch"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "REPEAT",
"value": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
]
}
]
}
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "STRING",
"value": ")"
}
]
},
{
"type": "BLANK"
}

@@ -459,2 +679,32 @@ ]

{
"type": "SYMBOL",
"name": "statement_block"
}
]
},
"finally": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "finally"
},
{
"type": "SYMBOL",
"name": "statement_block"
}
]
},
"throw_statement": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "throw"
},
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "CHOICE",

@@ -539,2 +789,10 @@ "members": [

"type": "SYMBOL",
"name": "constructor_call"
},
{
"type": "SYMBOL",
"name": "ternary"
},
{
"type": "SYMBOL",
"name": "bool_op"

@@ -548,2 +806,6 @@ },

"type": "SYMBOL",
"name": "bitwise_op"
},
{
"type": "SYMBOL",
"name": "rel_op"

@@ -553,50 +815,278 @@ },

"type": "SYMBOL",
"name": "type_op"
},
{
"type": "SYMBOL",
"name": "assignment"
},
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": ")"
}
]
"type": "SYMBOL",
"name": "math_assignment"
},
{
"type": "SYMBOL",
"name": "_paren_expression"
}
]
},
"member_access": {
"function_call": {
"type": "PRECEDENCE",
"value": 20,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "("
},
{
"type": "ERROR",
"value": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "arguments"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "STRING",
"value": ")"
}
]
}
},
"constructor_call": {
"type": "PRECEDENCE",
"value": 21,
"rule": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "new"
},
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "ERROR",
"value": {
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "arguments"
},
{
"type": "BLANK"
}
]
}
},
{
"type": "STRING",
"value": ")"
}
]
},
{
"type": "BLANK"
}
]
}
]
}
},
"arguments": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
},
{
"type": "STRING",
"value": "."
},
{
"type": "SYMBOL",
"name": "identifier"
"type": "REPEAT",
"value": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
}
]
}
}
]
},
"function_call": {
"member_access": {
"type": "PRECEDENCE",
"value": 31,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "."
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
}
},
"subscript_access": {
"type": "PRECEDENCE",
"value": 10,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "["
},
{
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
},
{
"type": "STRING",
"value": "]"
}
]
}
},
"assignment": {
"type": "PRECEDENCE",
"value": -2,
"rule": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "member_access"
},
{
"type": "SYMBOL",
"name": "subscript_access"
}
]
},
{
"type": "STRING",
"value": "="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
"math_assignment": {
"type": "PRECEDENCE",
"value": -2,
"rule": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "member_access"
},
{
"type": "SYMBOL",
"name": "subscript_access"
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "+="
},
{
"type": "STRING",
"value": "-="
},
{
"type": "STRING",
"value": "*="
},
{
"type": "STRING",
"value": "/="
}
]
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
"object": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "("
"value": "{"
},

@@ -607,10 +1097,10 @@ {

{
"type": "BLANK"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "pair"
}
},

@@ -627,4 +1117,7 @@ {

{
"type": "SYMBOL",
"name": "expression"
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "pair"
}
}

@@ -635,2 +1128,5 @@ ]

]
},
{
"type": "BLANK"
}

@@ -641,7 +1137,7 @@ ]

"type": "STRING",
"value": ")"
"value": "}"
}
]
},
"assignment": {
"pair": {
"type": "SEQ",

@@ -658,7 +1154,3 @@ "members": [

"type": "SYMBOL",
"name": "member_access"
},
{
"type": "SYMBOL",
"name": "subscript_access"
"name": "string"
}

@@ -669,3 +1161,3 @@ ]

"type": "STRING",
"value": "="
"value": ":"
},

@@ -678,29 +1170,24 @@ {

},
"subscript_access": {
"function": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
"type": "KEYWORD",
"value": "function"
},
{
"type": "STRING",
"value": "["
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "BLANK"
}
]
},
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "]"
}
]
},
"object": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "{"
"value": "("
},

@@ -711,72 +1198,7 @@ {

{
"type": "BLANK"
"type": "SYMBOL",
"name": "formal_parameters"
},
{
"type": "SEQ",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "string"
}
]
},
{
"type": "STRING",
"value": ":"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
},
{
"type": "REPEAT",
"value": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "SYMBOL",
"name": "string"
}
]
},
{
"type": "STRING",
"value": ":"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
]
}
}
]
"type": "BLANK"
}

@@ -787,19 +1209,6 @@ ]

"type": "STRING",
"value": "}"
}
]
},
"function": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "function"
"value": ")"
},
{
"type": "SYMBOL",
"name": "formal_parameters"
},
{
"type": "SYMBOL",
"name": "statement_block"

@@ -813,41 +1222,20 @@ }

{
"type": "STRING",
"value": "("
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "CHOICE",
"members": [
{
"type": "BLANK"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "REPEAT",
"value": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
}
}
]
}
]
},
{
"type": "STRING",
"value": ")"
"type": "REPEAT",
"value": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "identifier"
}
]
}
}

@@ -864,6 +1252,9 @@ ]

{
"type": "REPEAT",
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "statement"
"type": "REPEAT",
"value": {
"type": "SYMBOL",
"name": "statement"
}
}

@@ -888,10 +1279,10 @@ },

{
"type": "BLANK"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
},

@@ -908,4 +1299,7 @@ {

{
"type": "SYMBOL",
"name": "expression"
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
}

@@ -916,2 +1310,5 @@ ]

]
},
{
"type": "BLANK"
}

@@ -928,3 +1325,3 @@ ]

"type": "PATTERN",
"value": "\\a+\\d*"
"value": "[\\a_$][\\a\\d_$]*"
},

@@ -934,26 +1331,44 @@ "number": {

"value": {
"type": "SEQ",
"type": "CHOICE",
"members": [
{
"type": "PATTERN",
"value": "\\d+"
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "0x"
},
{
"type": "PATTERN",
"value": "[\\da-fA-F]+"
}
]
},
{
"type": "CHOICE",
"type": "SEQ",
"members": [
{
"type": "SEQ",
"type": "PATTERN",
"value": "\\d+"
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "."
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "."
},
{
"type": "PATTERN",
"value": "\\d*"
}
]
},
{
"type": "PATTERN",
"value": "\\d+"
"type": "BLANK"
}
]
},
{
"type": "BLANK"
}

@@ -969,37 +1384,180 @@ ]

{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "&&"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 4,
"rule": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "!"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "||"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 2,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "&&"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 1,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "||"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
}
]
},
"bitwise_op": {
"type": "CHOICE",
"members": [
{
"type": "PRECEDENCE",
"value": 13,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": ">>"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 13,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "<<"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 12,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "&"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 11,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "|"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
}
]
},
"ternary": {
"type": "PRECEDENCE",
"value": -1,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "?"
},
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": ":"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
"math_op": {

@@ -1009,60 +1567,152 @@ "type": "CHOICE",

{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "++"
}
]
"type": "PRECEDENCE",
"value": 14,
"rule": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "-"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "--"
}
]
"type": "PRECEDENCE",
"value": 14,
"rule": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "+"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "+"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 14,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "++"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "-"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 14,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "--"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 11,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "+"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 11,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "-"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 12,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "*"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 12,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "/"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
}

@@ -1075,139 +1725,235 @@ ]

{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "<"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 10,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "<"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "<="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 10,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "<="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "=="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 10,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "=="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "==="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 10,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "==="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "!="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 10,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "!="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "!=="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 10,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": "!=="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": ">="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 10,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": ">="
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": ">"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
"type": "PRECEDENCE",
"value": 10,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "STRING",
"value": ">"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
}
]
},
"type_op": {
"type": "CHOICE",
"members": [
{
"type": "PRECEDENCE",
"value": 14,
"rule": {
"type": "SEQ",
"members": [
{
"type": "KEYWORD",
"value": "typeof"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 12,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "KEYWORD",
"value": "instanceof"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
},
{
"type": "PRECEDENCE",
"value": 12,
"rule": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "expression"
},
{
"type": "KEYWORD",
"value": "in"
},
{
"type": "SYMBOL",
"name": "expression"
}
]
}
}
]
},
"string": {

@@ -1345,7 +2091,7 @@ "type": "TOKEN",

"type": "PATTERN",
"value": "[^/\\n]"
"value": "[^\\\\/\\n]"
},
{
"type": "STRING",
"value": "\\/"
"type": "PATTERN",
"value": "\\\\."
}

@@ -1394,2 +2140,22 @@ ]

},
"_paren_expression": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "ERROR",
"value": {
"type": "SYMBOL",
"name": "expression"
}
},
{
"type": "STRING",
"value": ")"
}
]
},
"_line_break": {

@@ -1396,0 +2162,0 @@ "type": "STRING",

{
"name": "tree-sitter-javascript",
"version": "0.0.2",
"version": "0.0.3",
"description": "Javascript grammar for node-tree-sitter",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc