JetBrains / JetBrains/Grammar-Kit
How to utilize existing javadoc parsing in a custom language plugin using grammar kit
- Dominant language
- Java
- Stars
- 771
- Forks
- 137
- Avg merge
- 11h 14m
- Merged PRs (30d)
- 1
Description
Following the documentation and tutorial around creating a language plugin for Jetbrains IDE's, it's unclear how one might utilize the existing JavaDoc parser as a sub-parser while parsing a custom grammar. I've defined the grammar elements to parse a JavaDoc-style comment block into a token, and I've tried mixing in or extending the element for it with a custom ASTWrapperPsiElement class where I can invoke the JavaDoc parser. However, the getChildren function on that class is never called, and I'm not sure how else to wire that parser in based on the generated output of the lexer and parser.
Is this possible, and are there docs that cover this?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the language-plugin tutorial and documentation referenced in the issue, then inspect how the existing JavaDoc parser could be used with generated lexer and parser output. Compare the custom grammar elements and ASTWrapperPsiElement approach, especially why getChildren is not called; done means documenting whether this integration is possible and how to wire it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- compilers, tooling
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100