KDoc link parsing rewrite.
Support qualified names immediately after tag (@see or @param). Detect whether a tag is followed by a reference immediately while lexing, remove TEXT_OR_LINK token type. Remove duplicate nested KDocLink nodes from the PSI structure.
This commit is contained in:
@@ -7,51 +7,48 @@ JetFile: MarkdownLinkWithError.kt
|
||||
KDOC_SECTION
|
||||
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||
PsiElement(KDOC_TEXT)(' ')
|
||||
KDOC_LINK
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_NAME
|
||||
KDOC_NAME
|
||||
KDOC_NAME
|
||||
KDOC_NAME
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(IDENTIFIER)('C')
|
||||
PsiErrorElement:Closing bracket expected
|
||||
<empty list>
|
||||
PsiElement(RANGE)('..')
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiElement(IDENTIFIER)('C')
|
||||
PsiErrorElement:Closing bracket expected
|
||||
<empty list>
|
||||
PsiElement(RANGE)('..')
|
||||
PsiElement(DOT)('.')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||
PsiElement(KDOC_TEXT)(' [....]')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||
PsiElement(KDOC_TEXT)(' ')
|
||||
KDOC_LINK
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_NAME
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiErrorElement:Closing bracket expected
|
||||
<empty list>
|
||||
PsiElement(RANGE)('..')
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(RANGE)('..')
|
||||
PsiElement(IDENTIFIER)('C')
|
||||
PsiElement(RBRACKET)(']')
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_NAME
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiErrorElement:Closing bracket expected
|
||||
<empty list>
|
||||
PsiElement(RANGE)('..')
|
||||
PsiElement(IDENTIFIER)('B')
|
||||
PsiElement(RANGE)('..')
|
||||
PsiElement(IDENTIFIER)('C')
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||
PsiElement(KDOC_TEXT)(' ')
|
||||
KDOC_LINK
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_NAME
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(DOT)('.')
|
||||
PsiErrorElement:Identifier expected
|
||||
<empty list>
|
||||
PsiElement(RBRACKET)(']')
|
||||
KDOC_MARKDOWN_LINK
|
||||
PsiElement(LBRACKET)('[')
|
||||
KDOC_NAME
|
||||
PsiElement(IDENTIFIER)('A')
|
||||
PsiElement(DOT)('.')
|
||||
PsiErrorElement:Identifier expected
|
||||
<empty list>
|
||||
PsiElement(RBRACKET)(']')
|
||||
PsiWhiteSpace('\n ')
|
||||
PsiElement(KDOC_END)('*/')
|
||||
Reference in New Issue
Block a user