KT-482 Support nested comments: comments nest properly, but strings are not accounted for inside comments
#KT-482 In progress
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/*
|
||||
@@ -0,0 +1,4 @@
|
||||
JetFile: BlockCommentAtBeginningOfFile1.jet
|
||||
PsiComment(BLOCK_COMMENT)('/*')
|
||||
NAMESPACE_HEADER
|
||||
<empty list>
|
||||
@@ -0,0 +1,2 @@
|
||||
/*
|
||||
/*
|
||||
@@ -0,0 +1,4 @@
|
||||
JetFile: BlockCommentAtBeginningOfFile2.jet
|
||||
PsiComment(BLOCK_COMMENT)('/*\n/*')
|
||||
NAMESPACE_HEADER
|
||||
<empty list>
|
||||
@@ -0,0 +1,3 @@
|
||||
/*
|
||||
|
||||
fooo
|
||||
@@ -0,0 +1,4 @@
|
||||
JetFile: BlockCommentAtBeginningOfFile3.jet
|
||||
PsiComment(BLOCK_COMMENT)('/*\n\nfooo')
|
||||
NAMESPACE_HEADER
|
||||
<empty list>
|
||||
@@ -0,0 +1,5 @@
|
||||
/*
|
||||
|
||||
/*foo*/
|
||||
|
||||
asdfas
|
||||
@@ -0,0 +1,4 @@
|
||||
JetFile: BlockCommentAtBeginningOfFile4.jet
|
||||
PsiComment(BLOCK_COMMENT)('/*\n\n/*foo*/\n\nasdfas')
|
||||
NAMESPACE_HEADER
|
||||
<empty list>
|
||||
@@ -0,0 +1 @@
|
||||
/**
|
||||
@@ -0,0 +1,4 @@
|
||||
JetFile: DocCommentAtBeginningOfFile1.jet
|
||||
PsiComment(DOC_COMMENT)('/**')
|
||||
NAMESPACE_HEADER
|
||||
<empty list>
|
||||
@@ -0,0 +1,2 @@
|
||||
/**
|
||||
/**
|
||||
@@ -0,0 +1,4 @@
|
||||
JetFile: DocCommentAtBeginningOfFile2.jet
|
||||
PsiComment(DOC_COMMENT)('/**\n/**')
|
||||
NAMESPACE_HEADER
|
||||
<empty list>
|
||||
@@ -0,0 +1,3 @@
|
||||
/**
|
||||
|
||||
fooo
|
||||
@@ -0,0 +1,4 @@
|
||||
JetFile: DocCommentAtBeginningOfFile3.jet
|
||||
PsiComment(DOC_COMMENT)('/**\n\nfooo')
|
||||
NAMESPACE_HEADER
|
||||
<empty list>
|
||||
@@ -0,0 +1,5 @@
|
||||
/**
|
||||
|
||||
/**foo*/
|
||||
|
||||
asdfas
|
||||
@@ -0,0 +1,4 @@
|
||||
JetFile: DocCommentAtBeginningOfFile4.jet
|
||||
PsiComment(DOC_COMMENT)('/**\n\n/**foo*/\n\nasdfas')
|
||||
NAMESPACE_HEADER
|
||||
<empty list>
|
||||
@@ -0,0 +1,19 @@
|
||||
fun doo() {
|
||||
/*/b
|
||||
// */
|
||||
b
|
||||
/**/
|
||||
b
|
||||
/* */
|
||||
b
|
||||
/*/**/*/
|
||||
b
|
||||
/***/
|
||||
b
|
||||
/**/***/*/
|
||||
b
|
||||
/** /**
|
||||
|
||||
*/***/
|
||||
b
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
JetFile: NestedComments.jet
|
||||
NAMESPACE_HEADER
|
||||
<empty list>
|
||||
FUN
|
||||
PsiElement(fun)('fun')
|
||||
PsiWhiteSpace(' ')
|
||||
PsiElement(IDENTIFIER)('doo')
|
||||
VALUE_PARAMETER_LIST
|
||||
PsiElement(LPAR)('(')
|
||||
PsiElement(RPAR)(')')
|
||||
PsiWhiteSpace(' ')
|
||||
BLOCK
|
||||
PsiElement(LBRACE)('{')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiComment(BLOCK_COMMENT)('/*/b\n// */')
|
||||
PsiWhiteSpace('\n')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiComment(DOC_COMMENT)('/**/\nb\n/* */\nb\n/*/**/*/\nb\n/***/\nb\n/**/***/')
|
||||
PsiErrorElement:Expecting an element
|
||||
PsiElement(MUL)('*')
|
||||
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line)
|
||||
PsiElement(DIV)('/')
|
||||
PsiWhiteSpace('\n')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiComment(DOC_COMMENT)('/** /**\n\n*/***/')
|
||||
PsiWhiteSpace('\n')
|
||||
REFERENCE_EXPRESSION
|
||||
PsiElement(IDENTIFIER)('b')
|
||||
PsiWhiteSpace('\n')
|
||||
PsiElement(RBRACE)('}')
|
||||
Reference in New Issue
Block a user