mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-27 16:57:49 +08:00
The use of `Language.findInstance()` implicitly depended on the fact that `SimpleLanguage.INSTANCE` was referenced at some earlier point in time. In this case, that happens because the instantiation of `SimpleParserDefinition` triggers the instantiation of `COMMENTS`, which relies on `SimpleTypes.COMMENT`. When basing one's work on this sample project, however, one may run into issues. Specifically, the absence of a custom comment token type will mean a failure to correctly instantiate the singleton language object. Making the dependence on `SimpleLanguage.INSTANCE` explicit prevents that issue from occurring.
Description
Mirror of the IntelliJ SDK Docs Code Samples
intellijintellij-ideaintellij-platformintellij-pluginintellij-pluginsintellij-sdkjetbrainsjetbrains-pluginjetbrains-plugins
158 MiB
Languages
Java
98.2%
Lex
0.9%
Kotlin
0.6%
HTML
0.3%