Skip to content

Commit f6ad787

Browse files
Replace private.switchStatementSubject with value scope (#2999)
* We're already using `value` for the collection in for-each statements: - https://github.com/cursorless-dev/cursorless/blob/d55c744091394d8840a17e04ef8b7d21f03068b3/data/fixtures/scopes/javascript.core/value.foreach.scope * Most of the tree sitter parsers call this field `value`. The other alternative that's commonly used is `condition`, but we're already using that in switch cases and I want to avoid conflicts. - https://github.com/cursorless-dev/cursorless/blob/d55c744091394d8840a17e04ef8b7d21f03068b3/queries/javascript.core.scm#L614 Since this scope is private we're not going to do any migration or deprecation. It will just be removed. The this pull requests adds `value` scope support for the switch subject though. With that said I'm going to leave this open for a week in case someone has input.
1 parent 4ba0b0b commit f6ad787

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

src/spoken_forms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ def handle_new_values(csv_name: str, values: list[SpokenFormEntry]):
156156
],
157157
extra_allowed_values=[
158158
"private.fieldAccess",
159-
"private.switchStatementSubject",
160159
"textFragment",
161160
"disqualifyDelimiter",
162161
"pairDelimiter",

0 commit comments

Comments
 (0)