Open eugmes opened 4 years ago
Injection regex is specified too broadly for tree-sitter-c grammar. It matches anything that contains letter 'c' in it.
This behavior is confusing when one tries to add injection points for languages like ocaml (not possible right now anyway).
The current code is here: https://github.com/atom/language-c/blob/af1e7f5ec8a2db9337a7e0c86e5286d5cef47d3d/grammars/tree-sitter-c.cson#L6
Perhaps it should better be changed to something like:
injectionRegex: '^(c|C)$'
Summary
Injection regex is specified too broadly for tree-sitter-c grammar. It matches anything that contains letter 'c' in it.
Motivation
This behavior is confusing when one tries to add injection points for languages like ocaml (not possible right now anyway).
The current code is here: https://github.com/atom/language-c/blob/af1e7f5ec8a2db9337a7e0c86e5286d5cef47d3d/grammars/tree-sitter-c.cson#L6
Perhaps it should better be changed to something like: