Fixed doc-comment not attached to the first declaration with no package directive + incorrect placement of comments for enum entry
This commit is contained in:
@@ -40,6 +40,7 @@ object PrecedingWhitespacesAndCommentsBinder : WhitespacesAndCommentsBinder {
|
|||||||
}
|
}
|
||||||
else if (tokenType in JetTokens.COMMENTS && tokenType != JetTokens.DOC_COMMENT) {
|
else if (tokenType in JetTokens.COMMENTS && tokenType != JetTokens.DOC_COMMENT) {
|
||||||
if (atStreamEdge ||
|
if (atStreamEdge ||
|
||||||
|
idx == 0 ||
|
||||||
idx > 0 && tokens[idx - 1] == JetTokens.WHITE_SPACE && StringUtil.containsLineBreak(getter[idx - 1])) {
|
idx > 0 && tokens[idx - 1] == JetTokens.WHITE_SPACE && StringUtil.containsLineBreak(getter[idx - 1])) {
|
||||||
result = idx
|
result = idx
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -199,6 +199,9 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
firstEntry.drop();
|
firstEntry.drop();
|
||||||
|
|
||||||
consumeIf(SEMICOLON);
|
consumeIf(SEMICOLON);
|
||||||
|
|
||||||
|
packageDirective.done(PACKAGE_DIRECTIVE);
|
||||||
|
packageDirective.setCustomEdgeTokenBinders(null, TrailingWhitespacesAndCommentsBinder.INSTANCE$);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// When package directive is omitted we should not report error on non-file annotations at the beginning of the file.
|
// When package directive is omitted we should not report error on non-file annotations at the beginning of the file.
|
||||||
@@ -207,9 +210,10 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
|
|
||||||
parseFileAnnotationList(FILE_ANNOTATIONS_WHEN_PACKAGE_OMITTED);
|
parseFileAnnotationList(FILE_ANNOTATIONS_WHEN_PACKAGE_OMITTED);
|
||||||
packageDirective = mark();
|
packageDirective = mark();
|
||||||
|
packageDirective.done(PACKAGE_DIRECTIVE);
|
||||||
|
// this is necessary to allow comments at the start of the file to be bound to the first declaration:
|
||||||
|
packageDirective.setCustomEdgeTokenBinders(PrecedingWhitespacesAndCommentsBinder.INSTANCE$, null);
|
||||||
}
|
}
|
||||||
packageDirective.done(PACKAGE_DIRECTIVE);
|
|
||||||
packageDirective.setCustomEdgeTokenBinders(null, TrailingWhitespacesAndCommentsBinder.INSTANCE$);
|
|
||||||
|
|
||||||
parseImportDirectives();
|
parseImportDirectives();
|
||||||
}
|
}
|
||||||
@@ -706,8 +710,6 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
PsiBuilder.Marker nameAsDeclaration = mark();
|
PsiBuilder.Marker nameAsDeclaration = mark();
|
||||||
advance(); // IDENTIFIER
|
advance(); // IDENTIFIER
|
||||||
nameAsDeclaration.done(OBJECT_DECLARATION_NAME);
|
nameAsDeclaration.done(OBJECT_DECLARATION_NAME);
|
||||||
nameAsDeclaration.setCustomEdgeTokenBinders(PrecedingWhitespacesAndCommentsBinder.INSTANCE$,
|
|
||||||
TrailingWhitespacesAndCommentsBinder.INSTANCE$);
|
|
||||||
|
|
||||||
if (at(COLON)) {
|
if (at(COLON)) {
|
||||||
advance(); // COLON
|
advance(); // COLON
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
JetFile: BlockCommentAtBeginningOfFile1.kt
|
JetFile: BlockCommentAtBeginningOfFile1.kt
|
||||||
PsiComment(BLOCK_COMMENT)('/*')
|
|
||||||
PACKAGE_DIRECTIVE
|
PACKAGE_DIRECTIVE
|
||||||
<empty list>
|
<empty list>
|
||||||
|
PsiComment(BLOCK_COMMENT)('/*')
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
JetFile: BlockCommentAtBeginningOfFile2.kt
|
JetFile: BlockCommentAtBeginningOfFile2.kt
|
||||||
PsiComment(BLOCK_COMMENT)('/*\n/*')
|
|
||||||
PACKAGE_DIRECTIVE
|
PACKAGE_DIRECTIVE
|
||||||
<empty list>
|
<empty list>
|
||||||
|
PsiComment(BLOCK_COMMENT)('/*\n/*')
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
JetFile: BlockCommentAtBeginningOfFile3.kt
|
JetFile: BlockCommentAtBeginningOfFile3.kt
|
||||||
PsiComment(BLOCK_COMMENT)('/*\n\nfooo')
|
|
||||||
PACKAGE_DIRECTIVE
|
PACKAGE_DIRECTIVE
|
||||||
<empty list>
|
<empty list>
|
||||||
|
PsiComment(BLOCK_COMMENT)('/*\n\nfooo')
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
JetFile: BlockCommentAtBeginningOfFile4.kt
|
JetFile: BlockCommentAtBeginningOfFile4.kt
|
||||||
PsiComment(BLOCK_COMMENT)('/*\n\n/*foo*/\n\nasdfas')
|
|
||||||
PACKAGE_DIRECTIVE
|
PACKAGE_DIRECTIVE
|
||||||
<empty list>
|
<empty list>
|
||||||
|
PsiComment(BLOCK_COMMENT)('/*\n\n/*foo*/\n\nasdfas')
|
||||||
@@ -269,16 +269,16 @@ JetFile: CommentsBinding.kt
|
|||||||
ENUM_ENTRY
|
ENUM_ENTRY
|
||||||
OBJECT_DECLARATION_NAME
|
OBJECT_DECLARATION_NAME
|
||||||
PsiElement(IDENTIFIER)('A')
|
PsiElement(IDENTIFIER)('A')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiComment(EOL_COMMENT)('// this is A')
|
PsiComment(EOL_COMMENT)('// this is A')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
ENUM_ENTRY
|
ENUM_ENTRY
|
||||||
|
KDoc
|
||||||
|
PsiElement(KDOC_START)('/**')
|
||||||
|
PsiElement(KDOC_TEXT)(' This is B ')
|
||||||
|
PsiElement(KDOC_END)('*/')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
OBJECT_DECLARATION_NAME
|
OBJECT_DECLARATION_NAME
|
||||||
KDoc
|
|
||||||
PsiElement(KDOC_START)('/**')
|
|
||||||
PsiElement(KDOC_TEXT)(' This is B ')
|
|
||||||
PsiElement(KDOC_END)('*/')
|
|
||||||
PsiWhiteSpace(' ')
|
|
||||||
PsiElement(IDENTIFIER)('B')
|
PsiElement(IDENTIFIER)('B')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
ENUM_ENTRY
|
ENUM_ENTRY
|
||||||
@@ -288,12 +288,12 @@ JetFile: CommentsBinding.kt
|
|||||||
PsiElement(IDENTIFIER)('C')
|
PsiElement(IDENTIFIER)('C')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
ENUM_ENTRY
|
ENUM_ENTRY
|
||||||
|
KDoc
|
||||||
|
PsiElement(KDOC_START)('/**')
|
||||||
|
PsiElement(KDOC_TEXT)(' This is X ')
|
||||||
|
PsiElement(KDOC_END)('*/')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
OBJECT_DECLARATION_NAME
|
OBJECT_DECLARATION_NAME
|
||||||
KDoc
|
|
||||||
PsiElement(KDOC_START)('/**')
|
|
||||||
PsiElement(KDOC_TEXT)(' This is X ')
|
|
||||||
PsiElement(KDOC_END)('*/')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiElement(IDENTIFIER)('X')
|
PsiElement(IDENTIFIER)('X')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
CLASS_BODY
|
CLASS_BODY
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
[file:volatile]
|
||||||
|
/**
|
||||||
|
* Doc comment
|
||||||
|
*/
|
||||||
|
class C{}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
JetFile: DocCommentAfterFileAnnotations.kt
|
||||||
|
FILE_ANNOTATION_LIST
|
||||||
|
ANNOTATION
|
||||||
|
PsiElement(LBRACKET)('[')
|
||||||
|
PsiElement(file)('file')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
CONSTRUCTOR_CALLEE
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('volatile')
|
||||||
|
PsiElement(RBRACKET)(']')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
CLASS
|
||||||
|
KDoc
|
||||||
|
PsiElement(KDOC_START)('/**')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||||
|
PsiElement(KDOC_TEXT)(' Doc comment')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(KDOC_END)('*/')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(class)('class')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('C')
|
||||||
|
CLASS_BODY
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
/**
|
||||||
|
* Doc comment
|
||||||
|
*/
|
||||||
|
fun foo() {}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
JetFile: DocCommentForFirstDeclaration.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
FUN
|
||||||
|
KDoc
|
||||||
|
PsiElement(KDOC_START)('/**')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||||
|
PsiElement(KDOC_TEXT)(' Doc comment')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(KDOC_END)('*/')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
[file:volatile]
|
||||||
|
// class C
|
||||||
|
class C{}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
JetFile: LineCommentAfterFileAnnotations.kt
|
||||||
|
FILE_ANNOTATION_LIST
|
||||||
|
ANNOTATION
|
||||||
|
PsiElement(LBRACKET)('[')
|
||||||
|
PsiElement(file)('file')
|
||||||
|
PsiElement(COLON)(':')
|
||||||
|
ANNOTATION_ENTRY
|
||||||
|
CONSTRUCTOR_CALLEE
|
||||||
|
TYPE_REFERENCE
|
||||||
|
USER_TYPE
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('volatile')
|
||||||
|
PsiElement(RBRACKET)(']')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
CLASS
|
||||||
|
PsiComment(EOL_COMMENT)('// class C')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(class)('class')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('C')
|
||||||
|
CLASS_BODY
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
// This is foo
|
||||||
|
fun foo() {}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
JetFile: LineCommentForFirstDeclaration.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
|
FUN
|
||||||
|
PsiComment(EOL_COMMENT)('// This is foo')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
JetFile: Super.kt
|
JetFile: Super.kt
|
||||||
PsiComment(EOL_COMMENT)('// KT-156 Fix the this<Super> syntax')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
PACKAGE_DIRECTIVE
|
PACKAGE_DIRECTIVE
|
||||||
<empty list>
|
<empty list>
|
||||||
FUN
|
FUN
|
||||||
|
PsiComment(EOL_COMMENT)('// KT-156 Fix the this<Super> syntax')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(fun)('fun')
|
PsiElement(fun)('fun')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
PsiElement(IDENTIFIER)('foo')
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
JetFile: MutableArray.kt
|
JetFile: MutableArray.kt
|
||||||
KDoc
|
|
||||||
PsiElement(KDOC_START)('/**')
|
|
||||||
PsiWhiteSpace('\n ')
|
|
||||||
PsiElement(KDOC_TEXT)('These declarations are "shallow" in the sense that they are not really compiled, only the type-checker uses them')
|
|
||||||
PsiWhiteSpace('\n')
|
|
||||||
PsiElement(KDOC_END)('*/')
|
|
||||||
PsiWhiteSpace('\n\n')
|
|
||||||
PACKAGE_DIRECTIVE
|
PACKAGE_DIRECTIVE
|
||||||
<empty list>
|
<empty list>
|
||||||
CLASS
|
CLASS
|
||||||
|
KDoc
|
||||||
|
PsiElement(KDOC_START)('/**')
|
||||||
|
PsiWhiteSpace('\n ')
|
||||||
|
PsiElement(KDOC_TEXT)('These declarations are "shallow" in the sense that they are not really compiled, only the type-checker uses them')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(KDOC_END)('*/')
|
||||||
|
PsiWhiteSpace('\n\n')
|
||||||
MODIFIER_LIST
|
MODIFIER_LIST
|
||||||
PsiElement(open)('open')
|
PsiElement(open)('open')
|
||||||
PsiWhiteSpace(' ')
|
PsiWhiteSpace(' ')
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
JetFile: AtTags.kt
|
JetFile: AtTags.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
@@ -12,6 +14,4 @@ JetFile: AtTags.kt
|
|||||||
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
PsiElement(KDOC_LEADING_ASTERISK)('*')
|
||||||
PsiElement(KDOC_TEXT)(' @')
|
PsiElement(KDOC_TEXT)(' @')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(KDOC_END)('*/')
|
PsiElement(KDOC_END)('*/')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
JetFile: DocCommentAtBeginningOfFile1.kt
|
JetFile: DocCommentAtBeginningOfFile1.kt
|
||||||
KDoc
|
|
||||||
PsiElement(KDOC_START)('/**')
|
|
||||||
PACKAGE_DIRECTIVE
|
PACKAGE_DIRECTIVE
|
||||||
<empty list>
|
<empty list>
|
||||||
|
KDoc
|
||||||
|
PsiElement(KDOC_START)('/**')
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
JetFile: DocCommentAtBeginningOfFile2.kt
|
JetFile: DocCommentAtBeginningOfFile2.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(KDOC_TEXT)('/**')
|
PsiElement(KDOC_TEXT)('/**')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
JetFile: DocCommentAtBeginningOfFile3.kt
|
JetFile: DocCommentAtBeginningOfFile3.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiWhiteSpace('\n\n')
|
PsiWhiteSpace('\n\n')
|
||||||
PsiElement(KDOC_TEXT)('fooo')
|
PsiElement(KDOC_TEXT)('fooo')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
JetFile: DocCommentAtBeginningOfFile4.kt
|
JetFile: DocCommentAtBeginningOfFile4.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiWhiteSpace('\n\n')
|
PsiWhiteSpace('\n\n')
|
||||||
PsiElement(KDOC_TEXT)('/**foo*/')
|
PsiElement(KDOC_TEXT)('/**foo*/')
|
||||||
PsiWhiteSpace('\n\n')
|
PsiWhiteSpace('\n\n')
|
||||||
PsiElement(KDOC_TEXT)('asdfas')
|
PsiElement(KDOC_TEXT)('asdfas')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
JetFile: EndOnLeadingAsterisks.kt
|
JetFile: EndOnLeadingAsterisks.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(KDOC_END)('*/')
|
PsiElement(KDOC_END)('*/')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
JetFile: EndRightAfterText.kt
|
JetFile: EndRightAfterText.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiElement(KDOC_TEXT)('text')
|
PsiElement(KDOC_TEXT)('text')
|
||||||
PsiElement(KDOC_END)('*/')
|
PsiElement(KDOC_END)('*/')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
JetFile: Incomplete.kt
|
JetFile: Incomplete.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(KDOC_TEXT)('contents')
|
PsiElement(KDOC_TEXT)('contents')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
JetFile: Markdown.kt
|
JetFile: Markdown.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
@@ -15,6 +17,4 @@ JetFile: Markdown.kt
|
|||||||
PsiElement(KDOC_MARKDOWN_ESCAPED_CHAR)('\]')
|
PsiElement(KDOC_MARKDOWN_ESCAPED_CHAR)('\]')
|
||||||
PsiElement(KDOC_TEXT)(']')
|
PsiElement(KDOC_TEXT)(']')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(KDOC_END)('*/')
|
PsiElement(KDOC_END)('*/')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
JetFile: Simple.kt
|
JetFile: Simple.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiElement(KDOC_TEXT)(' line 0')
|
PsiElement(KDOC_TEXT)(' line 0')
|
||||||
@@ -18,6 +20,4 @@ JetFile: Simple.kt
|
|||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(KDOC_LEADING_ASTERISK)('**')
|
PsiElement(KDOC_LEADING_ASTERISK)('**')
|
||||||
PsiElement(KDOC_TEXT)(' line 6 ')
|
PsiElement(KDOC_TEXT)(' line 6 ')
|
||||||
PsiElement(KDOC_END)('*/')
|
PsiElement(KDOC_END)('*/')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
JetFile: TextRightAfterLeadAsterisks.kt
|
JetFile: TextRightAfterLeadAsterisks.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
<empty list>
|
||||||
KDoc
|
KDoc
|
||||||
PsiElement(KDOC_START)('/**')
|
PsiElement(KDOC_START)('/**')
|
||||||
PsiWhiteSpace('\n')
|
PsiWhiteSpace('\n')
|
||||||
PsiElement(KDOC_LEADING_ASTERISK)('**')
|
PsiElement(KDOC_LEADING_ASTERISK)('**')
|
||||||
PsiElement(KDOC_TEXT)('test')
|
PsiElement(KDOC_TEXT)('test')
|
||||||
PsiWhiteSpace('\n ')
|
PsiWhiteSpace('\n ')
|
||||||
PsiElement(KDOC_END)('*/')
|
PsiElement(KDOC_END)('*/')
|
||||||
PACKAGE_DIRECTIVE
|
|
||||||
<empty list>
|
|
||||||
@@ -136,6 +136,18 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest {
|
|||||||
doParsingTest(fileName);
|
doParsingTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("DocCommentAfterFileAnnotations.kt")
|
||||||
|
public void testDocCommentAfterFileAnnotations() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/DocCommentAfterFileAnnotations.kt");
|
||||||
|
doParsingTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("DocCommentForFirstDeclaration.kt")
|
||||||
|
public void testDocCommentForFirstDeclaration() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/DocCommentForFirstDeclaration.kt");
|
||||||
|
doParsingTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("DoubleColon.kt")
|
@TestMetadata("DoubleColon.kt")
|
||||||
public void testDoubleColon() throws Exception {
|
public void testDoubleColon() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/DoubleColon.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/DoubleColon.kt");
|
||||||
@@ -292,6 +304,18 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest {
|
|||||||
doParsingTest(fileName);
|
doParsingTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("LineCommentAfterFileAnnotations.kt")
|
||||||
|
public void testLineCommentAfterFileAnnotations() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/LineCommentAfterFileAnnotations.kt");
|
||||||
|
doParsingTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("LineCommentForFirstDeclaration.kt")
|
||||||
|
public void testLineCommentForFirstDeclaration() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/LineCommentForFirstDeclaration.kt");
|
||||||
|
doParsingTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("LocalDeclarations.kt")
|
@TestMetadata("LocalDeclarations.kt")
|
||||||
public void testLocalDeclarations() throws Exception {
|
public void testLocalDeclarations() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/LocalDeclarations.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/LocalDeclarations.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user