Removed binding of comment after package directive
This commit is contained in:
@@ -201,7 +201,6 @@ public class JetParsing extends AbstractJetParsing {
|
|||||||
consumeIf(SEMICOLON);
|
consumeIf(SEMICOLON);
|
||||||
|
|
||||||
packageDirective.done(PACKAGE_DIRECTIVE);
|
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.
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
package p1.p2;/** some */
|
||||||
|
fun foo(){}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
JetFile: DocCommentOnPackageDirectiveLine.kt
|
||||||
|
PACKAGE_DIRECTIVE
|
||||||
|
PsiElement(package)('package')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
DOT_QUALIFIED_EXPRESSION
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('p1')
|
||||||
|
PsiElement(DOT)('.')
|
||||||
|
REFERENCE_EXPRESSION
|
||||||
|
PsiElement(IDENTIFIER)('p2')
|
||||||
|
PsiElement(SEMICOLON)(';')
|
||||||
|
FUN
|
||||||
|
KDoc
|
||||||
|
PsiElement(KDOC_START)('/**')
|
||||||
|
PsiElement(KDOC_TEXT)(' some ')
|
||||||
|
PsiElement(KDOC_END)('*/')
|
||||||
|
PsiWhiteSpace('\n')
|
||||||
|
PsiElement(fun)('fun')
|
||||||
|
PsiWhiteSpace(' ')
|
||||||
|
PsiElement(IDENTIFIER)('foo')
|
||||||
|
VALUE_PARAMETER_LIST
|
||||||
|
PsiElement(LPAR)('(')
|
||||||
|
PsiElement(RPAR)(')')
|
||||||
|
BLOCK
|
||||||
|
PsiElement(LBRACE)('{')
|
||||||
|
PsiElement(RBRACE)('}')
|
||||||
@@ -148,6 +148,12 @@ public class JetParsingTestGenerated extends AbstractJetParsingTest {
|
|||||||
doParsingTest(fileName);
|
doParsingTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("DocCommentOnPackageDirectiveLine.kt")
|
||||||
|
public void testDocCommentOnPackageDirectiveLine() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/psi/DocCommentOnPackageDirectiveLine.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");
|
||||||
|
|||||||
Reference in New Issue
Block a user