Skip to content

Commit e5e9929

Browse files
Update queries for parse tree extension 0.35.0 (#2898)
Waiting for cursorless-dev/vscode-parse-tree#103
1 parent 93df278 commit e5e9929

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

packages/cursorless-engine/src/languages/latex.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
const COMMANDS = [
1818
"command",
1919
"displayed_equation",
20+
"generic_command",
2021
"inline_formula",
2122
"math_set",
2223
"block_comment",

packages/cursorless-engine/src/languages/scala.ts

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import type { NodeMatcherAlternative } from "../typings/Types";
33
import { patternFinder } from "../util/nodeFinders";
44
import {
55
argumentMatcher,
6-
conditionMatcher,
76
createPatternMatchers,
87
leadingMatcher,
98
matcher,
@@ -53,7 +52,6 @@ const nodeMatchers: Partial<
5352
["*[value]", "*[default_value]", "type_definition[type]"],
5453
["="],
5554
),
56-
condition: conditionMatcher("*[condition]"),
5755

5856
// Scala features unsupported in Cursorless terminology
5957
// - Pattern matching

queries/php.scm

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
(method_declaration) @namedFunction
7979
(expression_statement
8080
(assignment_expression
81-
right: (anonymous_function_creation_expression)
81+
right: (anonymous_function)
8282
) @namedFunction
8383
";" @_.trailing
8484
)
@@ -91,7 +91,7 @@
9191
] @namedFunction.domain
9292

9393
[
94-
(anonymous_function_creation_expression)
94+
(anonymous_function)
9595
(arrow_function)
9696
] @anonymousFunction
9797

queries/scala.scm

+13-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
(interpolated_string_expression)
88
] @string @textFragment
99

10-
(comment) @comment @textFragment
10+
[
11+
(comment)
12+
(block_comment)
13+
] @comment @textFragment
1114

1215
;; treating classes = classlike
1316
[
@@ -42,6 +45,15 @@
4245
pattern: (_) @name
4346
) @_.domain
4447

48+
(_
49+
condition: (_
50+
.
51+
"(" @condition.start.endOf
52+
")" @condition.end.startOf
53+
.
54+
)
55+
) @_.domain
56+
4557
operator: (operator_identifier) @disqualifyDelimiter
4658
(enumerator
4759
"<-" @disqualifyDelimiter

queries/scm.scm

+3-4
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@
6060
(anonymous_node
6161
name: [
6262
"_" @type
63-
(identifier
64-
"\"" @type.start.endOf
65-
"\"" @type.end.startOf
63+
(string
64+
(string_content) @type
6665
)
6766
]
6867
) @_.domain
@@ -105,7 +104,7 @@
105104
":"
106105
(anonymous_node
107106
[
108-
(identifier)
107+
(string)
109108
"_"
110109
] @value.end
111110
(quantifier)? @value.end

0 commit comments

Comments
 (0)