-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
173 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[*] | ||
charset=utf-8 | ||
end_of_line=lf | ||
indent_style=tab | ||
tab_width=3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
KotlinFunctionSignature::= | ||
modifiers | ||
"fun" | ||
typeParameters? // generics | ||
(type ".")? | ||
SimpleName | ||
typeParameters? | ||
valueParameters (":" type)? | ||
typeConstraints | ||
|
||
//TODO | ||
//TODO | ||
//TODO | ||
|
||
// You know it. | ||
private SimpleName ::= <java identifier> | ||
"`" <java identifier> "`" | ||
|
||
//TODO BEGIN modifiers | ||
modifiers::=(modifier | annotations)* | ||
private modifier::= classModifier | ||
| accessModifier | ||
| varianceAnnotation | ||
| memberModifier | ||
| parameterModifier | ||
| typeParameterModifier | ||
| functionModifier | ||
| propertyModifier | ||
|
||
private classModifier ::= "abstract" | ||
| "final" | ||
| "enum" | ||
| "open" | ||
| "annotation" | ||
| "sealed" | ||
| "data" | ||
|
||
private memberModifier::="override" | ||
| "open" | ||
| "final" | ||
| "abstract" | ||
| "lateinit" | ||
|
||
private accessModifier::="private" | ||
| "protected" | ||
| "public" | ||
| "internal" | ||
|
||
private varianceAnnotation::="in" | ||
| "out" | ||
|
||
private parameterModifier::="noinline" | ||
| "crossinline" | ||
| "vararg" | ||
|
||
private typeParameterModifier::="reified" | ||
|
||
private functionModifier::="tailrec" | ||
| "operator" | ||
| "infix" | ||
| "inline" | ||
| "external" | ||
| suspendModifier | ||
private propertyModifier::="const" | ||
private suspendModifier::="suspend" | ||
|
||
private annotations ::= (annotation | annotationList)* | ||
private annotationList ::= "@" (annotationUseSiteTarget ":")? unescapedAnnotation | ||
private annotationUseSiteTarget ::= "field" | ||
| "file" | ||
| "property" | ||
| "get" | ||
| "set" | ||
| "receiver" | ||
| "param" | ||
| "setparam" | ||
| "delegate" | ||
private unescapedAnnotation ::= SimpleName {"."} typeArguments? valueArguments? | ||
private typeArguments ::= "<" type {","} ">" | ||
private valueArguments ::= "(" (SimpleName "=")? "*"? expression {","} ")" | ||
|
||
|
||
private annotation ::= "@" (annotationUseSiteTarget ":")? "[" unescapedAnnotation+ "]" | ||
|
||
//TODO END modifiers | ||
|
||
// TODO BEGIN typeParameters | ||
typeParameters ::="<" typeParameter (comma typeParameter)* ">" | ||
private comma::="," | ||
private typeParameter::= modifiers SimpleName (":" userType)? | ||
// TODO END typeParameters | ||
|
||
// TODO BEGIN type | ||
type::=typeModifiers typeReference | ||
private typeModifiers ::= (suspendModifier | annotations)* | ||
private typeReference ::= "(" typeReference ")" | ||
| functionType | ||
| userType | ||
// | nullableType | ||
| "dynamic" | ||
|
||
private functionType ::= (type ".")? "(" parameter{","}? ")" "->" type? | ||
private parameter::= SimpleName ":" type | ||
|
||
private userType::= simpleUserType{"."} | ||
private simpleUserType::= SimpleName ("<" (optionalProjection type | "*"){","} ">")? | ||
private optionalProjection ::= varianceAnnotation | ||
|
||
//private nullableType ::= typeReference "?" | ||
|
||
// TODO END type | ||
|
||
valueParameters ::= "(" functionParameter{","}? ")" | ||
private functionParameter ::= modifiers ("val" | "var")? parameter ("=" expression)? | ||
|
||
typeConstraints ::= ("where" typeConstraint{","})? | ||
private typeConstraint ::= annotations SimpleName ":" type | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters