你可以在哪里找到TextMate语法的文档?

huangapple go评论67阅读模式
英文:

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_grammarshttps://macromates.com/manual/en/scope_selectors 找到。对于v2版本,请访问 https://macromates.com/textmate/manual/language-grammarshttps://macromates.com/textmate/manual/scopes

如果您想查看示例,可以查看内置扩展。例如,HTML的示例

英文:

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.

huangapple
  • 本文由 发表于 2023年7月13日 16:14:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76677267.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定