igorini
00a5ff2364
Fix inline block in notation.grm
2017-05-28 17:12:52 +01:00
Mikhail Zarechenskiy
d3fd96ceed
Parse collection literals as atomic expressions
2017-03-22 17:59:58 +03:00
Alexander Udalov
3ad4f18e1a
Update grammar to Kotlin 1.1
...
Also drop obsolete comments and inline some trivial rules
2017-03-01 14:50:36 +03:00
Dmitry Jemerov
e68dcdcc1e
Fix companion object definition in the grammar (KT-8566)
2016-11-10 13:40:57 +01:00
Dmitry Jemerov
2c989b5671
Fix enumEntries definition in grammar (KT-14261)
2016-11-10 13:40:49 +01:00
Dmitry Jemerov
a0b6b3c248
Fix labelDefinition link in grammar (KT-14262)
2016-11-10 13:40:31 +01:00
Denis Zharkov
bec84b1d7b
Change parsing of annotations on block level expressions
...
Attach annotations to the closest prefix expression instead of
whole statement if no new line found after annotations
The motivation is for a simple annotated expression like '@ann x + y'
its syntax form must not change after prepending 'val z = ' just before it
2016-10-12 11:39:04 +03:00
Denis Zharkov
9ff439e39e
Change annotations parsing in bodies of operators
...
This change only matters in cases of if/when/for/while having braceless
blocks
Annotations on them are parsed now as on block-level expressions, i.e.
they're attached to the whole expression
2016-10-12 11:39:04 +03:00
Denis Zharkov
7353b08f09
Change parsing of statements starting with annotations
...
If a block statement starts with annotations treat them as they
belong to node of the statement rather than to the closest prefix expression
#KT-10210 Fixed
2016-10-05 10:29:29 +03:00
Denis Zharkov
75a51d915f
Implement parsing of desctructuring declarations in lambdas
...
#KT-5828 In Progress
2016-09-19 20:22:57 +03:00
Mikhail Glukhikh
8bdc88f763
Grammar: obsolete 'annotationEntry' changed to 'unescapedAnnotation' in a few places
...
(cherry picked from commit d9818bd)
2016-07-19 15:09:17 +03:00
Mikhail Glukhikh
75832f9d80
Grammar: obsolete 'package' element removed #KT-8429 Fixed
...
(cherry picked from commit 7bdf556)
2016-07-19 15:09:08 +03:00
Mikhail Glukhikh
23ae042154
A set of soft modifiers added to grammar #KT-13143 Fixed
...
(cherry picked from commit 904a18c)
2016-07-19 15:08:58 +03:00
Andrey Breslav
8544b9a1d6
Rule for function literals fixed: parameter types are allowed
2016-06-02 20:09:28 +03:00
Alexander Udalov
1339286261
Drop undocumented absolute name specification feature with 'package.'
2016-06-01 19:30:03 +03:00
Yan Zhulanow
4298559858
Minor: fix sparam -> setparam
2016-04-22 19:48:28 +03:00
Alexander Udalov
66417ed329
Parse type arguments after callable reference as error
...
Is likely to be supported in the future
2015-10-15 18:25:42 +03:00
Denis Zharkov
5f69789636
Stop parsing lambdas with deprecated syntax
2015-09-25 08:29:25 +03:00
Denis Zharkov
02aafe4262
Report syntax error on unescaped annotation
...
Also adjust parser testData
2015-09-18 09:34:26 +03:00
Denis Zharkov
daa2c8372d
Do not parse '@' as a part of modifier
2015-09-18 09:34:25 +03:00
Yan Zhulanow
1010658a85
Parse other use-site targeted annotations
2015-08-31 15:05:03 +03:00
Yan Zhulanow
2bacbc9046
Support @field: annotations
2015-08-31 15:05:02 +03:00
Denis Zharkov
9d87638a11
Clarify grammar rules for annotations
2015-06-12 09:55:01 +03:00
Dmitry Jemerov
18753a16d7
a bunch of fixes to the grammar
2015-06-08 14:46:28 +02:00
Denis Zharkov
9c574469ca
Parsing: allow primary ctor in object syntactically
...
It's needed for better recovering for cases of changes like 'class' -> 'object'
The only sensible case when it's may be bad:
class A {
object B
constructor() : super()
}
But it seems to be rare, and ';' can be used to separate object from secondary ctor
2015-06-02 14:07:48 +03:00
Denis Zharkov
e4f54b5d2e
Parsing: support '@[ann1 ann2]', '@file:ann' and '@file:[ann]' cases
2015-05-20 09:24:56 +03:00
Denis Zharkov
805a811d91
Change parsing rules for primary constructor
...
- Parse 'constructor' keyword before value arguments
- Allow unescaped annotations
2015-05-20 09:24:54 +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
Mikhail Glukhikh
cf741cb868
Enum parsing changed: first entries, then members. Grammar fixed accordingly.
...
A set of compiler tests and some plugin tests changed accordingly.
Compiler Kotlin code changed accordingly.
2015-05-15 16:13:27 +03:00
Denis Zharkov
aa7bae213d
Introduce ++ operator into grammar
2015-05-07 22:36:16 +03:00
Denis Zharkov
b72a3de86e
Parse annotations on lambda-argument
2015-05-07 22:36:15 +03:00
Denis Zharkov
7d8351abc6
Implement parsing annotations and modifiers starting with '@'
2015-05-07 22:36:15 +03:00
Denis Zharkov
507eefcaa5
Implement new parsing rules for labels
...
See changes in expressions.grm
2015-04-29 14:03:10 +03:00
Andrey Breslav
a389d694d8
Merge pull request #605 from JetBrains/rr/yole/delete-confluence-grammar-generator
...
delete old grammar generator
2015-03-20 15:16:33 +03:00
Dmitry Jemerov
bed63c8321
delete old grammar generator
2015-03-20 12:08:05 +01:00
Dmitry Jemerov
888b655cd6
add some missing elements to Kotlin grammar
...
#KT-7049 Fixed
2015-03-20 11:54:16 +01:00
Pavel V. Talanov
06916d98c6
default -> companion: replace all mentions of default and default object
2015-03-17 15:47:39 +03:00
Denis Zharkov
3ba94d7352
Parsing: secondary constructors
2015-03-11 17:45:22 +03:00
Denis Zharkov
a55e8911ea
Drop parsing of enum initializers using `this'
...
#KT-6626 Fixed
2015-03-11 17:45:22 +03:00
Pavel V. Talanov
48fbce9582
Refactor: process mentions of class object
...
Rename usages that refer to "default object" concept now
Test data file names are left as is
2015-03-03 20:57:08 +03:00
Alexander Udalov
ead8c8ac1d
Rename jet -> kotlin in frontend: lexer, kdoc
...
org.jetbrains.jet.lexer -> org.jetbrains.kotlin.lexer
org.jetbrains.jet.kdoc -> org.jetbrains.kotlin.kdoc
Also rename Jet.flex -> Kotlin.flex
2015-01-10 15:52:12 +03:00
Alexander Udalov
b5c7f885a8
Rename package jet -> kotlin in grammar
...
org.jetbrains.jet.grammar -> org.jetbrains.kotlin.grammar
2015-01-03 13:00:38 +03:00
Andrey Breslav
28b466d069
Parsing dynamic types
2014-12-01 20:43:37 +03:00
Andrey Breslav
9feebb1dc6
"typedef" replaced with "typeAlias" in the grammar
2014-10-16 14:10:02 +04:00
Andrey Breslav
cc68ed894b
"type" is not a keyword anymore ("typealias" reserved instead)
2014-10-13 15:41:13 +04:00
Zalim Bashorov
506610302a
Parser: added the support file annotations to grammar.
2014-09-10 22:39:11 +04:00
Andrey Breslav
b8f7d68bd4
Minor tweaks in the grammar
2014-08-26 12:16:35 +04:00
kisenka
8da384b466
Convert markup from Confuence wiki to Markdown
2014-08-26 12:04:34 +04:00
Alexander Udalov
a9b2fd964b
Support nullable types on left-hand side of ::
...
#KT-1183 In Progress
2014-06-26 20:57:39 +04:00
Andrey Breslav
3255aaf231
Minor. Grammar rules fixed
2014-03-19 17:41:49 +04:00