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:
Andrey Breslav
2012-03-21 15:51:48 +01:00
parent 01679d315d
commit 3a73a96e06
21 changed files with 749 additions and 491 deletions
+34
View File
@@ -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)('}')