-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename trait LanguageScoper
to Query
#153
base: main
Are you sure you want to change the base?
Conversation
`LanguageScoper` is a misnomer. `Query` is implemented on a `CompiledQuery` and a `LanguageScoper` is used to query a given set of text to produce a list of `Scope`'s.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #153 +/- ##
=======================================
Coverage 86.77% 86.77%
=======================================
Files 32 32
Lines 1883 1883
=======================================
Hits 1634 1634
Misses 249 249 ☔ View full report in Codecov by Sentry. |
Hmm, not sure I follow. When you say
what is
Yes! But isn't it just as valid to say: a What we name it in the code I'm not attached to, but the user-facing side (docs, CLI) should make sense. Currently, the concepts are simple: there's scopers and actions. Regex can scope, and so can a literal string when we pass Currently, scopers are just things which take input text, and will discard parts (or none) of it as "out of scope". That abstraction mechanism works across regex, literal strings, and syntax "queries" (and maybe more in the future; and it also works for internal stuff like The trait is Line 116 in b53bf21
which I intend as " What do you reckon? |
My comments here are from the point-of-view of a newcomer to
I mean to say here that it makes sense to me that the trait that is implemented on It's a simpler statement, almost obvious to a reader, that a
Yea it's a synonym. But I'll argue below against needlessly using a synonym.
I look at At this stage, trying to hide tree-sitter concepts by mapping them to new That's all based on my reading that tree-sitter is fundamental to The other point I want to highlight are existing concepts and common meanings in English. But if you say: " The concept of A nomenclature of On the subject of interface concepts being mapped clearly onto the codebase. I am a fan of doing that unless there's a good reason not to. In this case I think it's pretty straight forward to map the UI concepts onto the codebase, where the code will of course be more nuanced than the concepts the users expresses themselves with. But why use different names for the same concept? Anyways this is all from my admittedly quite shallow interactions with |
The use of
LanguageScoper
is a type seems to be a misnomer.Query
is implemented on aCompiledQuery
and aLanguageScoper
is used to query a given set of text to produce a list ofScope
's.With this rename, a
lang::Query
producesScope
's and 'language scopingin a process that accepts
Query's as input and outputs
Scope`'s.