Commit Graph

46 Commits

Author SHA1 Message Date
Nikolay Krasko 0cd3e4f3a4 Minor: JetFile -> KtFile 2017-05-18 20:00:17 +03:00
Nikolay Krasko 52cd7109c7 Use left bound element types to tight empty delegation contructor call to declaration
CONSTRUCTOR_DELEGATION_CALL and CONSTRUCTOR_DELEGATION_REFERENCE types were modified.
2016-05-12 17:25:19 +03:00
Valentin Kipyatkov 68853fecc3 Removed support for "typealias" declarations from the parser
#KT-10683 Fixed
2016-01-19 19:31:44 +03:00
Dmitry Jemerov 009e3f9cd7 rename PSI classes according to current terminology:
KtMultiDeclaration(Entry) -> KtDestructuringDeclaration(Entry)
KtFunctionLiteralExpression -> KtLambdaExpression
KtFunctionLiteralArgument -> KtLambdaArgument
KtDelegationSpecifierList -> KtSuperTypeList
KtDelegationSpecifier -> KtSuperTypeListEntry
KtDelegatorToSuperClass -> KtSuperTypeEntry
KtDelegatorToSuperCall -> KtSuperTypeCallEntry
KtDelegationByExpressionSpecifier ->KtDelegatedSuperTypeEntry
2015-12-10 16:15:13 +01:00
Andrey Breslav 8544a5ab5f Remove "This" keyword 2015-11-30 19:36:33 +03:00
Yan Zhulanow a3ff3ffc45 Fix tests: "Placing function type parameters after the function name" error 2015-11-27 15:51:11 +03:00
Pavel V. Talanov dbd49c37c1 Psi: Introduce KtScriptInitializer, a separate entity for script initializers which are quite a bit different from class initializers 2015-11-19 22:57:07 +03:00
Valentin Kipyatkov 52dc23012f Changed parsing of object and enum entries to drop "KtObjectDeclarationName" 2015-11-05 23:21:22 +03:00
Mikhail Glukhikh d6988ad69e Get rid of FIELD_IDENTIFIER at syntax level, two errors dropped, a set of tests fixed / deleted #KT-9539 Fixed 2015-10-21 16:36:55 +03:00
Yan Zhulanow 6db9344659 Fix compiler tests 2015-09-25 19:20:20 +03:00
Denis Zharkov 5f69789636 Stop parsing lambdas with deprecated syntax 2015-09-25 08:29:25 +03:00
Denis Zharkov fc447e2d2f Parse some builtin annotations as modifiers
But still resolve them as annotations.
Mostly it's needed as begin of migration path, one day they become modifiers anyway

Some tests are dropped because they supposed that `annotation` should have parameter
2015-09-08 08:53:35 +03:00
Mikhail Glukhikh 3f14e74b08 Drop old enum syntax. Comma / semicolon are now a syntactic part of enum entry.
Comma must present now between enum entries, semicolon between last entry & first member, constructor calls must be without colons / specifiers.
A swarm of tests fixed accordingly.
2015-08-11 10:38:10 +03:00
Denis Zharkov cf4b1ab7cd Drop obsolete annotations syntax 2015-06-12 09:55:00 +03:00
Pavel V. Talanov 07d35d305e Create import list psi element even if no directives are present
Fix a problem where deleting last import directive via "optimize imports" could lead to incorrect psi structure resulting in CCE, see EA-64291
New imports are inserted at the head (after package directive if present) of the file (before any comments) if no imports were present
Add test for inserting import to file where a first statement is a comment
Drop code dealing with non-existing import list in ImportInsertHelperImpl
AbstractQuickFixTest: check for unexpected actions before changes to the file are made as it relies on the first line having specific format
2015-06-08 20:51:04 +03:00
Mikhail Glukhikh 1a312140e9 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.
2015-05-15 16:13:32 +03:00
Dmitry Jemerov 98b8784ab0 drop deprecated syntax for anonymous initializer blocks 2015-04-29 14:07:04 +02:00
Pavel V. Talanov a986d913c3 Remove traces of class object constraints feature from parser, frontend, tests and psi 2015-04-01 20:09:34 +03:00
Denis Zharkov af2bcfb524 Parse primary constructor into separate PSI element 2015-03-31 20:20:22 +03:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00
Pavel V. Talanov f1942b1a74 Parser: do not produce CLASS_OBJECT element
"class object" is parsed into OBJECT_DECLARATION instead
2015-02-16 15:38:30 +03:00
Dmitry Jemerov c3a496b9a2 introduce the concept of sections 2015-01-20 18:00:17 +01:00
Valentin Kipyatkov b811a6cab4 Corrected comments binding so that comments before local functions and classes are bound to them 2014-10-31 21:07:50 +03:00
Valentin Kipyatkov 377df47e29 Fixed doc-comment not attached to the first declaration with no package directive + incorrect placement of comments for enum entry 2014-10-31 21:07:50 +03:00
Valentin Kipyatkov 9dd4b5598e Comments binding (not complete yet) 2014-10-31 21:07:44 +03:00
Andrey Breslav cc68ed894b "type" is not a keyword anymore ("typealias" reserved instead) 2014-10-13 15:41:13 +04:00
Svetlana Isakova 2ae87cae4a Function literal expression outside the parentheses wrapped into JetFunctionLiteralArgument
Extracted JetFunctionLiteralArgument.moveInsideParenthesesAndReplaceWith util function
2014-07-30 17:14:00 +04:00
Pavel V. Talanov 24364dd63b Get rid of JetNodeTypes#LOOP_PARAMETER 2014-03-24 17:05:58 +04:00
Evgeny Gerashchenko 791b5bb84c JetNamespaceHeader → JetPackageDirective. 2014-01-14 18:06:48 +04:00
Alexey Sedunov 28b3db53fe Fix irregular PSI structure for classes without body 2013-10-15 18:43:59 +04:00
Evgeny Gerashchenko e338cda06d Changed extension in parsing test data (jet -> kt) 2013-09-17 18:10:00 +04:00
Sergey Rostov 12e20378a2 KDoc lexer refactored (got rid of hacks and separate tokens for words). Fixed bug with isInComment(element) detection. 2013-05-28 13:05:28 +04:00
Sergey Rostov 5ff1f746d4 KT-1545, KT-3161 KDoc lexer & parser 2013-05-28 13:05:28 +04:00
Evgeny Gerashchenko 7bfa4a9c09 Removed tuples from PSI tests. 2013-03-22 16:37:16 +04:00
Andrey Breslav 6feceaa161 PsiElement for receiver declaration in a function type
This fixes the following assertion:

EA-37795 - assert: DescriptorResolver.checkBounds

java.lang.AssertionError: (
        public val categoryName: String,
        public val defaultReoccurrenceRate: DateReoccurrence,
        datesCollection: Collection<Date>) {

	at org.jetbrains.jet.lang.resolve.DescriptorResolver.checkBounds(DescriptorResolver.java:1137)
	at org.jetbrains.jet.lang.resolve.TypeHierarchyResolver.checkTypesInClassHeaders(TypeHierarchyResolver.java:447)
	at org.jetbrains.jet.lang.resolve.TypeHierarchyResolver.process(TypeHierarchyResolver.java:154)
	at org.jetbrains.jet.lang.resolve.TopDownAnalyzer.doProcess(TopDownAnalyzer.java:125)

Caused by misbehavior of the JetFunctionType class
2012-11-06 15:29:14 +04:00
Andrey Breslav 10d453ce6a Removing grammar/parsing support for complext patterns
#KT-2359 In progress
2012-09-05 14:18:40 +04:00
Andrey Breslav 7caa1b8aa4 KT-2364 Drop traces of constructor-entries in enums
#KT-2364 Fixed
2012-08-29 22:07:42 +04:00
Andrey Breslav bf503e9a4b KT-2363 Drop secondary constructors
#KT-2363 Fixed
2012-07-19 19:53:06 +04:00
Andrey Breslav 408b91e43d KT-1130 Remove ref from keywords 2012-01-25 13:13:38 +04:00
Andrey Breslav 90b98a63b5 KT-1130 Remove ref from keywords 2012-01-25 13:12:42 +04:00
svtk cc3a7448dc KT-657 Semantic checks for when without condition 2012-01-18 19:28:39 +04:00
Andrey Breslav 6aafaa1851 JetNamespace eliminated 2011-12-27 20:23:58 +04:00
Andrey Breslav 91d10790b4 GreatSyntacticShift: Parser test data fixed 2011-12-21 10:57:09 +02:00
Andrey Breslav 49c29dd323 KT-691 Allow to create nested namespaces with dot delimiter 2011-11-30 15:06:55 +03:00
Dmitry Jemerov ec6dec0d37 separate compiler and plugin tests 2011-10-20 16:21:18 +02:00