Open Bug 1886331 Opened 1 year ago Updated 3 months ago

Syntax highlighting can break syntax highlighting on kotlin backtick identifier strings in test files because the tokenizer doesn't understand the backtick syntax

Categories

(Webtools :: Searchfox, defect)

defect

Tracking

(Not tracked)

People

(Reporter: jackyzy823, Unassigned)

References

Details

The kotlin tokenizer spec doesn't seem to set backtick_strings to true, and it seems like perhaps the c-like tokenizer doesn't really understand backtick strings if that's not enabled.

It seems that kotlin's use of backticks is for escaping sketchy identifiers so the additional state machine that backtick_strings enables which exists for JS backtick strings might not be desirable to turn on. Probably the most pragmatic thing would be to do something like the rust_tweaks mechanism.

That said, there's an open enhancement bug to move to just using tree-sitter as our tokenizer and https://github.com/mozsearch/mozsearch/blob/master/tools/src/tree_sitter_support/cst_tokenizer.rs from the hyperblame enhancement work has a building block of that in place.

Summary: Syntax highlighting broken for some kotlin file → Syntax highlighting can break syntax highlighting on kotlin backtick identifier strings in test files because the tokenizer doesn't understand the backtick syntax
Duplicate of this bug: 1935520
You need to log in before you can comment on or make changes to this bug.