tree-sitter-javascript
Advanced tools
Comparing version 0.21.3 to 0.21.4
@@ -600,4 +600,4 @@ /** | ||
_glimmer_template_content: _ => /.{1,}/, | ||
glimmer_opening_tag: _ => seq('<template>'), | ||
glimmer_closing_tag: _ => seq('</template>'), | ||
glimmer_opening_tag: _ => '<template>', | ||
glimmer_closing_tag: _ => '</template>', | ||
@@ -612,6 +612,7 @@ _jsx_element: $ => choice($.jsx_element, $.jsx_self_closing_element), | ||
// Should not contain new lines and should not start or end with a space | ||
jsx_text: _ => choice( | ||
/[^{}<>\n& ]([^{}<>\n&]*[^{}<>\n& ])?/, | ||
/\/\/[^\n]*/, | ||
// if there is a newline, only capture if there's non-whitespace-text | ||
token.immediate(/[^{}<>&]*[^{}<>\s\p{Zs}\uFEFF\u2028\u2029\u2060\u200B&][^{}<>&]*/), | ||
// whitespace between jsx_tags should be captured if there's no newline | ||
token.immediate(/[^{}<>\n&]+/), | ||
), | ||
@@ -992,12 +993,10 @@ | ||
// http://stackoverflow.com/questions/13014947/regex-to-match-a-c-style-multiline-comment/36328890#36328890 | ||
comment: _ => choice( | ||
token(choice( | ||
seq('//', /[^\r\n\u2028\u2029]*/), | ||
seq( | ||
'/*', | ||
/[^*]*\*+([^/*][^*]*\*+)*/, | ||
'/', | ||
), | ||
)), | ||
), | ||
comment: _ => token(choice( | ||
seq('//', /[^\r\n\u2028\u2029]*/), | ||
seq( | ||
'/*', | ||
/[^*]*\*+([^/*][^*]*\*+)*/, | ||
'/', | ||
), | ||
)), | ||
@@ -1069,3 +1068,3 @@ template_string: $ => seq( | ||
seq(decimalIntegerLiteral, exponentPart), | ||
seq(decimalDigits), | ||
decimalDigits, | ||
); | ||
@@ -1072,0 +1071,0 @@ |
{ | ||
"name": "tree-sitter-javascript", | ||
"version": "0.21.3", | ||
"version": "0.21.4", | ||
"description": "JavaScript grammar for tree-sitter", | ||
@@ -5,0 +5,0 @@ "repository": "github:tree-sitter/tree-sitter-javascript", |
@@ -980,7 +980,2 @@ [ | ||
{ | ||
"type": "comment", | ||
"named": true, | ||
"fields": {} | ||
}, | ||
{ | ||
"type": "computed_property_name", | ||
@@ -1622,12 +1617,2 @@ "named": true, | ||
{ | ||
"type": "glimmer_closing_tag", | ||
"named": true, | ||
"fields": {} | ||
}, | ||
{ | ||
"type": "glimmer_opening_tag", | ||
"named": true, | ||
"fields": {} | ||
}, | ||
{ | ||
"type": "glimmer_template", | ||
@@ -3232,6 +3217,2 @@ "named": true, | ||
{ | ||
"type": "</template>", | ||
"named": false | ||
}, | ||
{ | ||
"type": "<<", | ||
@@ -3249,6 +3230,2 @@ "named": false | ||
{ | ||
"type": "<template>", | ||
"named": false | ||
}, | ||
{ | ||
"type": "=", | ||
@@ -3358,2 +3335,6 @@ "named": false | ||
{ | ||
"type": "comment", | ||
"named": true | ||
}, | ||
{ | ||
"type": "const", | ||
@@ -3423,2 +3404,10 @@ "named": false | ||
{ | ||
"type": "glimmer_closing_tag", | ||
"named": true | ||
}, | ||
{ | ||
"type": "glimmer_opening_tag", | ||
"named": true | ||
}, | ||
{ | ||
"type": "hash_bang_line", | ||
@@ -3425,0 +3414,0 @@ "named": true |
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 too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
4494958
11645