New enum syntax: Short constructor syntax introduced for entries, optional commas between entries, semicolon after entries. #KT-7605 Fixed.

Grammar changed accordingly.
Semicolons prohibited after an entry except the last one.
Only one initializer is allowed per entry.
EnumReferenceExpression AST node introduced.
Some tests fixed, a pair of new tests written. Kotlin code inside project fixed.
Formatter and intendation tests fixed accordingly.
Stub version is incremented.
This commit is contained in:
Mikhail Glukhikh
2015-05-05 19:55:25 +03:00
parent 67cce57aeb
commit 1a312140e9
48 changed files with 1152 additions and 91 deletions
@@ -133,20 +133,23 @@ JetFile: enumEntries.kt
ENUM_ENTRY
OBJECT_DECLARATION_NAME
PsiElement(IDENTIFIER)('Ann')
PsiErrorElement:Expecting member declaration
PsiElement(LPAR)('(')
PsiErrorElement:Expecting member declaration
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
FUN
MODIFIER_LIST
ANNOTATION_ENTRY
INITIALIZER_LIST
DELEGATOR_SUPER_CALL
CONSTRUCTOR_CALLEE
TYPE_REFERENCE
USER_TYPE
REFERENCE_EXPRESSION
PsiElement(IDENTIFIER)('W')
PsiWhiteSpace('\n\n ')
ENUM_ENTRY_SUPERCLASS_REFERENCE_EXPRESSION
<empty list>
VALUE_ARGUMENT_LIST
PsiElement(LPAR)('(')
PsiElement(RPAR)(')')
PsiWhiteSpace(' ')
ENUM_ENTRY
OBJECT_DECLARATION_NAME
PsiElement(IDENTIFIER)('W')
PsiWhiteSpace('\n\n ')
FUN
MODIFIER_LIST
ANNOTATION_ENTRY
PsiElement(AT)('@')
CONSTRUCTOR_CALLEE