Fixed the /**/ case. It is now a comment

This commit is contained in:
Andrey Breslav
2012-03-23 09:46:09 +01:00
parent 73baa8b65d
commit 77159a0d8e
4 changed files with 456 additions and 428 deletions
@@ -164,6 +164,10 @@ LONG_TEMPLATE_ENTRY_END=\}
// (Nested) comments // (Nested) comments
"/**/" {
return JetTokens.BLOCK_COMMENT;
}
"/**" { "/**" {
pushState(DOC_COMMENT); pushState(DOC_COMMENT);
commentDepth = 0; commentDepth = 0;
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -10,10 +10,10 @@ b
b b
/***/ /***/
b b
/**/***/*/ /** /***/*/
b b
/** /** /** /**
*/***/ */***/
b b
} }
+21 -5
View File
@@ -17,11 +17,27 @@ JetFile: NestedComments.jet
REFERENCE_EXPRESSION REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b') PsiElement(IDENTIFIER)('b')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
PsiComment(DOC_COMMENT)('/**/\nb\n/* */\nb\n/*/**/*/\nb\n/***/\nb\n/**/***/') PsiComment(BLOCK_COMMENT)('/**/')
PsiErrorElement:Expecting an element PsiWhiteSpace('\n')
PsiElement(MUL)('*') REFERENCE_EXPRESSION
PsiErrorElement:Unexpected tokens (use ';' to separate expressions on the same line) PsiElement(IDENTIFIER)('b')
PsiElement(DIV)('/') PsiWhiteSpace('\n')
PsiComment(BLOCK_COMMENT)('/* */')
PsiWhiteSpace('\n')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
PsiWhiteSpace('\n')
PsiComment(BLOCK_COMMENT)('/*/**/*/')
PsiWhiteSpace('\n')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
PsiWhiteSpace('\n')
PsiComment(DOC_COMMENT)('/***/')
PsiWhiteSpace('\n')
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b')
PsiWhiteSpace('\n')
PsiComment(DOC_COMMENT)('/** /***/*/')
PsiWhiteSpace('\n') PsiWhiteSpace('\n')
REFERENCE_EXPRESSION REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('b') PsiElement(IDENTIFIER)('b')