Egor Kulikov
877e11419e
Stub updates for RawFirBuilder
...
First step for KT-52615
2022-11-18 11:40:09 +01:00
Yan Zhulanow
89c9646e2f
[FE] Restore source compatibility in KtPsiFactory
...
Prevent huge code migration in kt- release branches by returning the
previously available API in deprecated status.
2022-11-15 14:58:39 +00:00
Yan Zhulanow
ea3f550b58
[FE] Support analyzable files throughout all 'KtPsiFactory' API
...
Before, the only way of getting analyzable elements was to create an
analyzable file by using 'createAnalyzableFile()'. So made all utilities
available in 'KtPsiFactory' useless as they delegate to 'createFile()'
that always set the 'doNotAnalyze' flag.
The new behavior is to pass the 'analysisContext' instead if it is
passed to the 'KtPsiFactory' constructor.
The newly appeared API is going to be used in the Kotlin's UAST
implementation.
2022-11-11 11:28:34 +00:00
Vladimir Dolzhenko
5dc2442872
Safe reporting PSI elements in KEWA
2022-11-03 17:27:11 +00:00
Ivan Kochurkin
952274e046
[Lexer] Restore KtToken constructors without tokenId parameter
...
Mark them as @Deprecated, ^KT-54745 Fixed
2022-11-01 18:35:08 +00:00
Vladimir Dolzhenko
2ff97271e0
Fix addDeclaration in case of neigbour PsiErrorElement
...
Relates to #KTIJ-20214
2022-11-01 12:00:34 +00:00
Dmitriy Novozhilov
d423782fac
[FE 1.0] Remove usages of safeAs and cast from most of FE 1.0 modules:
...
- :core:descriptors
- :core:descriptors.jvm
- :core:deserialization
- :compiler:cli
- :compiler:frontend
- :compiler:frontend:cfg
- :compiler:frontend.java
- :compiler:frontend.common.jvm
- :compiler:psi
- :compiler:resolution
- :compiler:resolution.common
- :compiler:resolution.common.jvm
- :kotlin-reflect-api
2022-10-12 13:58:56 +00:00
Nikolay Lunyak
f578381726
[FIR] KT-46483: Forbid annotations in where Clauses
...
Merge-request: KT-MR-7208
Merged-by: Nikolay Lunyak <lunyak.kolya@mail.ru >
2022-09-28 13:38:18 +00:00
Vladimir Dolzhenko
fc8cb40a0d
Make KtFileElementType#INSTANCE final
...
#KT-53781
2022-09-19 20:34:35 +00:00
Vladimir Dolzhenko
8804742220
Revert back and deprecate KtStubElementTypes#FILE
...
Due to usages in some external tooling
#KT-53781
2022-09-19 20:34:35 +00:00
Vladimir Dolzhenko
da86e536ad
Do not swallow exception throwing IOOBE
...
#KTIJ-22746
2022-09-15 21:30:34 +00:00
Dmitriy Novozhilov
7ef81c27df
[AA] Make KotlinReferenceProvidersService and KotlinReferenceProviderContributor a project services
...
There is no need to have those services on application level
2022-09-15 17:27:20 +03:00
Vladimir Dolzhenko
298494fa08
Drop KtStubElementTypes.FILE
...
FILE elements are always registered eagerly on parser definition load
and should not be mentioned in stubElementTypeHolder interfaces.
KtFileElementType.INSTANCE was defined in 2 places, first as
getFileNodeType of KotlinParserDefinition and second is
KtStubElementTypes. In order to ensure that there are no conflicts
in stubs the platform needs to recheck these 2 declarations,
and it triggers loading of KtStubElementTypes fields. We do not need
to declare FILE element in KtStubElementTypes and may just remove this
declaration as excessive. This will delay init of KtStubElementTypes
to the moment when Kotlin files appear in indexes.
#KT-53781
2022-09-15 10:35:05 +00:00
Vladimir Dolzhenko
584eb9dfa9
Move TokenSet from KtStubElementTypes
...
KtStubElementTypes has to have only KtStubElementType fields to provide
ability to initialize stub element types lazily.
#KT-53781
2022-09-15 10:35:04 +00:00
Mikhael Bogdanov
c168a19a58
Build compiler with -Xjvm-default=all + @JvmDefaultCompatibility when needed
2022-09-14 14:40:37 +02:00
Mikhail Glukhikh
a9b8f6715b
Revert "[FE 1.0] Resolve setters through the new type inference infra"
...
This reverts commit 6e191147b9 .
2022-09-13 09:09:00 +00:00
Roman Golyshev
3f6742916a
Increment stub binary version due to externalId change
...
Follow-up to e0c2813a37
2022-09-09 18:48:30 +02:00
Vladimir Dolzhenko
e0c2813a37
Increment version due to externalId change
...
#KT-53781
2022-09-09 08:17:50 +00:00
Toshiaki Kameyama
26d4e02b7c
Allow KtPsiFactory#createModifierList to create fun modifier
...
#KTIJ-16332
2022-09-07 18:03:51 +00:00
Pavel Mikhailovskii
85ab8b4ce1
KT-53783 Prohibit "expect data object" syntax
2022-09-07 12:53:24 +00:00
Vladimir Dolzhenko
79d1ca0504
Align externalId
...
externalId for any field in stubElementTypeHolder has to be prefix (`kotlin`) + dot (`.`) + field name
#KT-53781
2022-09-06 10:52:33 +00:00
Roman Golyshev
35116696b2
Add missing @Override annotation to KtParameter
2022-08-31 12:41:44 +00:00
Denis.Zharkov
3d7969ec8f
Revert "KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing"
...
This reverts commit 2053363def .
^KT-35811 Open
2022-08-30 11:21:50 +00:00
Denis.Zharkov
211d662708
Revert "KT-8263: Conditional operators are not parsed correctly"
...
This reverts commit ec8da2033c .
For the reason for the revert see KT-53719
^KT-8263 Open
^KT-53719 Fixed
2022-08-30 11:21:50 +00:00
Iven Krall
ec8da2033c
KT-8263: Conditional operators are not parsed correctly
2022-08-16 10:00:54 +00:00
Iven Krall
2053363def
KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing
2022-08-16 10:00:53 +00:00
Ivan Kochurkin
c0fe14a091
Make myExpressionParsing final (Parser)
2022-08-05 13:20:41 +00:00
Ivan Kochurkin
daeb41b411
Minor fixes in parser
2022-08-05 13:20:40 +00:00
Ivan Kochurkin
1d73d4cfbf
Reduce allocations in lastDotAfterReceiver (parsing)
2022-08-05 13:20:40 +00:00
Ivan Kochurkin
cf190f0cf2
Use switch case statement instead of sequence of if comparisons in parser
2022-08-05 13:20:39 +00:00
Ivan Kochurkin
6bb2af142c
Use static initialization for token sets that are used in expect method in Kotlin parser
2022-08-05 13:20:39 +00:00
Denis.Zharkov
11a26e540e
Revert "KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing"
...
This reverts commit a2077f9063 .
2022-08-04 17:50:00 +02:00
Denis.Zharkov
2ae2a7e442
Revert "KT-8263: Conditional operators are not parsed correctly"
...
This reverts commit 85800b4f9f .
2022-08-04 17:49:42 +02:00
Iven Krall
85800b4f9f
KT-8263: Conditional operators are not parsed correctly
2022-08-04 11:24:09 +00:00
Iven Krall
a2077f9063
KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing
2022-08-04 11:24:08 +00:00
Ilya Kirillov
d9c4fda521
[Analysis API FIR] implement reference resolve inside KDoc
...
^KTIJ-22324 fixed
2022-07-28 01:37:53 +02:00
Victor Petukhov
6e191147b9
[FE 1.0] Resolve setters through the new type inference infra
...
^KT-48961 In progress
2022-07-22 16:03:50 +00:00
Ilya Kirillov
a6b6c79dc2
[PSI] do not throw exception on incorrect expression in KtPsiFactory.createExpressionIfPossible
2022-07-06 23:03:20 +02:00
Bart van Helvert
7bef560b6b
KTIJ-21986 Don't log non-kotlin code fragment context when it's null
...
This warning shouldn't be logged when the context is null.
2022-07-01 08:15:58 +00:00
Pavel Mikhailovskii
c3c09aa95a
KT-4107 Data objects
2022-06-28 16:58:20 +02:00
Mikhail Zarechenskiy
47beef16f3
Increase binary stub version for 1.7.0
...
New stub version forces reindex & reimport for JPS-based projects,
making their compiler plugin libs consisten with the bundled JPS
compiler
^KTIJ-21982
2022-06-24 15:05:18 +00:00
Ilya Kirillov
ba797fa1b4
[stubs] fix cls stubs for declarations with context receivers
...
^KTIJ-21243 fixed
2022-06-20 19:10:36 +02:00
Yan Zhulanow
191bac38a3
Fix 'PsiElement.getReference()' contract for Kotlin PSI (KT-52822)
...
As stated in JavaDoc for 'PsiElement' (formatting is slightly changed):
Returns the reference from this PSI element to another PSI element
(or elements), if one exists. If the element has multiple associated
references, returns the first associated reference.
2022-06-16 18:31:49 +00:00
Denis.Zharkov
9caa60d389
Revert "KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing"
...
This reverts commit ba5c85d6
^KT-52684 Related
2022-06-09 15:44:36 +00:00
Victor Petukhov
0b25ce4de9
[FE] Support resolve of until operator to rangeUntil
...
^KT-52420 Fixed
2022-05-31 08:42:55 +00:00
Victor Petukhov
19136019e4
[Parser] Support of parsing until operator
...
^KT-52419 Fixed
2022-05-31 08:42:54 +00:00
Alexey Belkov
5f3e5f80d4
areParenthesesUseless: fix various false positives
...
The tests for this change will be committed to intellij repository
when it switches to the next Kotlin compiler containing the fix.
^KTIJ-21665
^KT-47159
2022-05-24 15:09:12 +00:00
Iven Krall
ba5c85d6f2
KT-35811: Type parameter angle brackets followed by equal sign are parsed incorrectly if whitespace is missing
2022-05-18 17:23:40 +00:00
Iven Krall
514fce427b
KT-51714: Parsing fails for context receivers with incomplete label
...
^KT-51576 In Progress
No test has been added since it would make indexing of Kotlin project failing
Will add it once bootstrap is advanced
2022-05-17 15:27:28 +00:00
Victor Petukhov
2cfba51a29
[Compiler PSI] Make getContextReceivers default to preserve compatibility
...
^KT-51747 Fixed
2022-04-21 13:41:30 +00:00