英文:
Where can I find docs for TextMate grammars?
问题
我正在制作一种自定义编程语言。我想要制作一个VS Code扩展,用于对该语言的语法进行标记化处理。我还发现它使用TextMate语法。因此,我需要学习如何编写这样的语法。但我找不到任何关于TextMate语法的文档。
我已经在互联网上搜索了几天,找到了一些基本信息,比如这个,但我发现还有更多的内容涉及到JSON模式。所以我会感激官方文档或展示所有功能的参考文档。我已经到处都在寻找,但找不到其他任何信息。有人知道这些文档在哪里吗,或者它们是否存在?
英文:
I'm making a custom programming language. I wanted to make an VS Code extension, that will tokenize the language syntax. I also found out that it uses TextMate grammars. So I need to learn how to write a such grammar. And I can't find any documentation for TextMate grammars.
I've been searching internet for days and found some basic info like this, but I see that there's more through JSON schema. So i would appreciate official docs or reference that shows off ALL features. I've been looking literally everywhere and can't find anything else. Does anybody know where are these docs, or do they even exist??
答案1
得分: 0
TextMate v1中有关范围选择器的文档可在 https://macromates.com/manual/en/language_grammars 和 https://macromates.com/manual/en/scope_selectors 找到。对于v2版本,请访问 https://macromates.com/textmate/manual/language-grammars 和 https://macromates.com/textmate/manual/scopes。
英文:
The docs for scope selectors in TextMate v1 can be found at https://macromates.com/manual/en/language_grammars and https://macromates.com/manual/en/scope_selectors. For v2, at https://macromates.com/textmate/manual/language-grammars and https://macromates.com/textmate/manual/scopes.
If you want to look at examples, you can look at the builtin extension. For example the one for HTML.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论