File tree Expand file tree Collapse file tree 2 files changed +44
-1
lines changed
packages/cursorless-engine/src/languages Expand file tree Collapse file tree 2 files changed +44
-1
lines changed Original file line number Diff line number Diff line change @@ -222,7 +222,6 @@ const nodeMatchers: Partial<
222222 patternMatcher ( "meta_item[value]" , "const_item[value]" ) ,
223223 matcher ( returnValueFinder ) ,
224224 ) ,
225- attribute : trailingMatcher ( [ "mutable_specifier" , "attribute_item" ] ) ,
226225 branch : cascadingMatcher (
227226 patternMatcher ( "match_arm" ) ,
228227 matcher ( patternFinder ( "else_clause" ) , elseExtractor ( "if_expression" ) ) ,
Original file line number Diff line number Diff line change 11;; https://github.com/tree-sitter/tree-sitter-rust/blob/master/src/grammar.json
22
3+ ;; Generated by the following command:
4+ ;; `curl https://raw.githubusercontent.com/tree-sitter/tree-sitter-rust/36ae187ed6dd3803a8a89dbb54f3124c8ee74662/src/node-types.STATEMENT_TYPES | jq '[.[] | select(.type == "_declaration_statement") | .subtypes[].type, "expression_statement"]'`
5+ ;; (
6+ ;; (_
7+ ;; [
8+ ;; (associated_type)
9+ ;; (attribute_item)
10+ ;; (const_item)
11+ ;; (empty_statement)
12+ ;; (enum_item)
13+ ;; (extern_crate_declaration)
14+ ;; (foreign_mod_item)
15+ ;; (impl_item)
16+ ;; (inner_attribute_item)
17+ ;; (let_declaration)
18+ ;; (macro_definition)
19+ ;; (macro_invocation)
20+ ;; (function_item)
21+ ;; (function_signature_item)
22+ ;; (mod_item)
23+ ;; (static_item)
24+ ;; (struct_item)
25+ ;; (trait_item)
26+ ;; (type_item)
27+ ;; (union_item)
28+ ;; (use_declaration)
29+ ;; (expression_statement)
30+ ;; ] @statement
31+ ;; ) @_dummy
32+ ;; (#type? @_dummy source_file block declaration_list)
33+ ;; )
34+
335[
436 (if_expression)
537 (if_let_expression)
6395 value: (_) @private.switchStatementSubject
6496) @_.domain
6597
98+ ;; !! #[derive(Debug)]
99+ ;; ! ^^^^^^^^^^^^^^^^
100+ (attribute_item) @attribute
101+
102+ ;; !! &mut x;
103+ ;; ! ^^^
104+ (_
105+ (mutable_specifier) @attribute
106+ .
107+ (_) @_.trailing.startOf
108+ ) @_.domain
109+
66110operator: [
67111 "<"
68112 "<<"
You can’t perform that action at this time.
0 commit comments