I'm trying to understand how Visual Studio Code matches identifiers between theme and language files. For instance in one tmLanguage file I have a definition like this:
...
<dict>
<key>begin</key>
<string>'</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.java-or-c</string>
</dict>
</dict>
...
The dict contains the identifier punctuation.definition.string.begin.java-or-c to identify the start of the single quote string. Now looking in one of the tmThemes files I have, this identifier is never mentioned and in fact I can imagine that language file writers are free to use any identifier they want. But how can a theme be matched against them so that VS Code knows which color to apply? Is there somewhere a documentation describing the process?