Implement parsing annotations and modifiers starting with '@'

This commit is contained in:
Denis Zharkov
2015-05-04 11:50:16 +03:00
parent b13e932c3c
commit 7d8351abc6
27 changed files with 2275 additions and 88 deletions
@@ -0,0 +1,47 @@
private @open [Ann1(1)] @Ann2("1") Ann3("2") class A(
@volatile(1) private val x: @AnnType("3") @open Int,
@private var y: Int,
@open z: Int
) {
@private [Ann3(2)] @Ann4("4") fun foo() {
@data class LocalClass
print(1)
@inline(option1, option2)
[inline2] private
fun inlineLocal() {}
[Ann]
private
@abstract
@volatile var x = 1
foo(fun(@vararg @ann(1) x: Int) {})
}
val x: Int
@inject [inline] private @open get() = 1
@open @ann init {}
@companion object
@companion @private object B
@main
@private
constructor()
fun <@ann("") [ann] T : R> foo() {}
}
@private val x = 1
@inline private fun bar() = 1
fun bar() {
try {}
catch (@volatile e: Exception) {}
}