File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
- // -*- coding: utf-8 -*-
2
1
// ------------------------------------------------------------------------------------------------
3
2
// Copyright © 2021, tree-sitter-rust authors.
4
3
// See the LICENSE file in this repo for license details.
@@ -49,6 +48,9 @@ pub const GRAMMAR: &str = include_str!("../../grammar.js");
49
48
/// The syntax highlighting query for this language.
50
49
pub const HIGHLIGHT_QUERY : & str = include_str ! ( "../../queries/highlights.scm" ) ;
51
50
51
+ /// The injections query for this language.
52
+ pub const INJECTIONS_QUERY : & str = include_str ! ( "../../queries/injections.scm" ) ;
53
+
52
54
/// The symbol tagging query for this language.
53
55
pub const TAGGING_QUERY : & str = include_str ! ( "../../queries/tags.scm" ) ;
54
56
Original file line number Diff line number Diff line change @@ -92,8 +92,6 @@ module.exports = grammar({
92
92
$ . _declaration_statement
93
93
) ,
94
94
95
- shebang : $ => / # ! .* / ,
96
-
97
95
empty_statement : $ => ';' ,
98
96
99
97
expression_statement : $ => choice (
@@ -1468,6 +1466,8 @@ module.exports = grammar({
1468
1466
1469
1467
identifier : $ => / ( r # ) ? [ _ \p{ XID_Start} ] [ _ \p{ XID_Continue} ] * / ,
1470
1468
1469
+ shebang : $ => / # ! .* / ,
1470
+
1471
1471
_reserved_identifier : $ => alias ( choice (
1472
1472
'default' ,
1473
1473
'union' ,
Original file line number Diff line number Diff line change 8452
8452
"type" : " PATTERN" ,
8453
8453
"value" : " (r#)?[_\\ p{XID_Start}][_\\ p{XID_Continue}]*"
8454
8454
},
8455
+ "shebang" : {
8456
+ "type" : " PATTERN" ,
8457
+ "value" : " #!.*"
8458
+ },
8455
8459
"_reserved_identifier" : {
8456
8460
"type" : " ALIAS" ,
8457
8461
"content" : {
You can’t perform that action at this time.
0 commit comments