This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Remove recursive expression matching within function names #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background
The
entity.name.function.clojure
rule matches function names: within a S-expression, it matches the entry right after the opening parenthesis. Currently, once a function name is matched, we recursively try to match for other expressions within the function name.Problem
In GitHub.com's TextMate highlighting engine, this recursion is somehow preventing us from matching the end of the outer S-expression, leading to deeper and deeper nesting as we encounter more and more parenthesized S-expressions.
Drawbacks
Atom works fine with this Grammar. VSCode also works fine with the same grammar. This makes me thing there is a bug in our TextMate engine, but I haven't investigated deeply.
On the other hand, I don't understand why we would need to match syntactic structure within a function name. Maybe this is to handle namespaced symbols?
/cc @hanjos because you added this rule in #13. Could you explain the purpose of the
$self
pattern that I am removing here? I am guessing that there's a good reason for it; I'm just trying to work around some problems we're seeing./cc @jhawthorn @vmg @kivikakk