Convert markup from Confuence wiki to Markdown
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
h2. Annotations
|
## Annotations
|
||||||
*/
|
*/
|
||||||
|
|
||||||
annotations
|
annotations
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
/**
|
/**
|
||||||
h2. Classes
|
## Classes
|
||||||
|
|
||||||
bq. See [Classes and Inheritance]
|
See [Classes and Inheritance](classes.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
internal class Example<X, T : Comparable<X>>(protected val x : Foo<X, T>, y : Some)
|
internal class Example<X, T : Comparable<X>>(protected val x : Foo<X, T>, y : Some)
|
||||||
: Bar(x), Foo<X, T> by x, IAbstractSome by y.asAbstract()
|
: Bar(x), Foo<X, T> by x, IAbstractSome by y.asAbstract()
|
||||||
where
|
where
|
||||||
@@ -13,7 +12,6 @@ internal class Example<X, T : Comparable<X>>(protected val x : Foo<X, T>, y : So
|
|||||||
{
|
{
|
||||||
// members
|
// members
|
||||||
}
|
}
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class
|
class
|
||||||
@@ -49,7 +47,7 @@ typeParameter
|
|||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
bq. See [Generic classes|Generics#Generic classes]
|
See [Generic classes](generics.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
typeConstraints
|
typeConstraints
|
||||||
@@ -61,5 +59,5 @@ typeConstraint
|
|||||||
: annotations "class" "object" SimpleName ":" type
|
: annotations "class" "object" SimpleName ":" type
|
||||||
;
|
;
|
||||||
/**
|
/**
|
||||||
bq. See [Generic constraints|Generics#Generic constraints]
|
See [Generic constraints](generics.html#generic-constraints)
|
||||||
*/
|
*/
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
h3. Class members
|
### Class members
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -26,8 +26,6 @@ class Example(a : Foo, i : Int) : Bar(i), Some {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// h5. Grammar
|
|
||||||
|
|
||||||
memberDeclaration
|
memberDeclaration
|
||||||
: classObject
|
: classObject
|
||||||
: object
|
: object
|
||||||
@@ -46,7 +44,7 @@ classObject
|
|||||||
: modifiers "class" object
|
: modifiers "class" object
|
||||||
;
|
;
|
||||||
/**
|
/**
|
||||||
bq. See [Class objects|Classes and Inheritance#Class objects]
|
See [Class objects](classes.html#class-objects)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
valueParameters
|
valueParameters
|
||||||
@@ -96,9 +94,8 @@ property
|
|||||||
("by" | "=" expression SEMI?)?
|
("by" | "=" expression SEMI?)?
|
||||||
(getter? setter? | setter? getter?) SEMI?
|
(getter? setter? | setter? getter?) SEMI?
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
bq. See [Properties and Fields]
|
See [Properties and Fields](properties.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
getter
|
getter
|
||||||
@@ -118,5 +115,5 @@ parameter
|
|||||||
object
|
object
|
||||||
: "object" SimpleName (":" delegationSpecifier{","})? classBody? // Class body can be optional: this is a declaration
|
: "object" SimpleName (":" delegationSpecifier{","})? classBody? // Class body can be optional: this is a declaration
|
||||||
/**
|
/**
|
||||||
bq. See [Object expressions and Declarations]
|
See [Object expressions and Declarations](object-declarations.html)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
h2. Control structures
|
## Control structures
|
||||||
|
|
||||||
bq. See [Control structures]
|
See [Control structures](control-flow.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if
|
if
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
h3. Enum classes
|
### Enum classes
|
||||||
|
|
||||||
bq. See [Enum classes]
|
See [Enum classes](enum-classes.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enumClassBody
|
enumClassBody
|
||||||
|
|||||||
+20
-22
@@ -1,27 +1,28 @@
|
|||||||
/**
|
/**
|
||||||
h2. Expressions
|
## Expressions
|
||||||
|
|
||||||
bq. See [Expressions]
|
<!--See [Expressions](expressions.html)-->
|
||||||
|
|
||||||
h3. Precedence
|
### Precedence
|
||||||
|
|
||||||
||*Precedence*||Title||Symbols||
|
| Precedence | Title | Symbols |
|
||||||
|Highest|Postfix|{{\+\+}}, {{\-\-}}, {{.}}, {{?.}}, {{?}}|
|
|------------|-------|---------|
|
||||||
| |Prefix|{{-}}, {{\+}}, {{\+\+}}, {{\-\-}}, {{!}}, [{{@label}}|#LabelName], {{@}}, {{@@}} |
|
| Highest | Postfix | `++`, `--`, `.`, `?.`, `?` |
|
||||||
| |Type RHS|{{:}}, {{as}}, {{as?}} |
|
| | Prefix | `-`, `+`, `++`, `--`, `!`, [`@label`](#LabelName), `@`, `@@` |
|
||||||
| |Multiplicative|{{*}}, {{/}}, {{%}} |
|
| | Type RHS | `:`, `as`, `as?` |
|
||||||
| |Additive|{{\+}}, {{-}} |
|
| | Multiplicative | `*`, `/`, `%` |
|
||||||
| |Range|{{..}} |
|
| | Additive | `+`, `-` |
|
||||||
| |Infix function|[{{SimpleName}}|#SimpleName] |
|
| | Range | `..` |
|
||||||
| |Elvis|{{?:}} |
|
| | Infix function | [`SimpleName`](#SimpleName) |
|
||||||
| |Named checks|{{in}}, {{\!in}}, {{is}}, {{\!is}} |
|
| | Elvis | `?:` |
|
||||||
| |Comparison|{{<}}, {{>}}, {{<=}}, {{>=}} |
|
| | Named checks | `in`, `!in`, `is`, `!is` |
|
||||||
| |Equality|{{==}}, {{\!==}}|
|
| | Comparison | `<`, `>`, `<=`, `>=` |
|
||||||
| |Conjunction|{{&&}}|
|
| | Equality | `==`, `\!==` |
|
||||||
| |Disjunction|{{\|\|}}|
|
| | Conjunction | `&&` |
|
||||||
|Lowest|Assignment|{{=}}, {{+=}}, {{-=}}, {{*=}}, {{/=}}, {{%=}}|
|
| | Disjunction | `||` |
|
||||||
|
| Lowest | Assignment | `=`, `+=`, `-=`, `*=`, `/=`, `%=` |
|
||||||
|
|
||||||
h3. Rules
|
### Rules
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -43,7 +44,6 @@ Decreasing precedence:
|
|||||||
assignmentOperator
|
assignmentOperator
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
expression
|
expression
|
||||||
: disjunction (assignmentOperator disjunction)*
|
: disjunction (assignmentOperator disjunction)*
|
||||||
;
|
;
|
||||||
@@ -284,5 +284,3 @@ objectLiteralMember
|
|||||||
factoryMethod
|
factoryMethod
|
||||||
: accessModifier? SimpleName typeParameters? functionParameters functionBody
|
: accessModifier? SimpleName typeParameters? functionParameters functionBody
|
||||||
;
|
;
|
||||||
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
h1. Lexical structure
|
# Lexical structure
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[helper]
|
[helper]
|
||||||
@@ -23,7 +23,7 @@ CharacterLiteral
|
|||||||
: <character as in Java>;
|
: <character as in Java>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
bq. See [Basic types]
|
See [Basic types](basic-types.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
StringWithTemplates
|
StringWithTemplates
|
||||||
@@ -33,7 +33,7 @@ NoEscapeString
|
|||||||
: <"""-quoted string>;
|
: <"""-quoted string>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
bq. See [String templates|Strings#Templates]
|
See [String templates](basic-types.html#templates)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
SEMI
|
SEMI
|
||||||
@@ -46,21 +46,19 @@ SimpleName
|
|||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
bq. See [Java interoperability]
|
See [Java interoperability](java-interop.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FieldName
|
FieldName
|
||||||
: "$" SimpleName;
|
: "$" SimpleName;
|
||||||
|
|
||||||
/**
|
See [Properties And Fields](properties.html)
|
||||||
bq. See [Properties And Fields]
|
|
||||||
*/
|
|
||||||
|
|
||||||
LabelName
|
LabelName
|
||||||
: "@" SimpleName;
|
: "@" SimpleName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
bq. See [Nonlocal returns and jumps]
|
<!--See [Nonlocal returns and jumps](returns.html)-->
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Symbols:
|
/* Symbols:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
h2. Modifiers
|
## Modifiers
|
||||||
*/
|
*/
|
||||||
|
|
||||||
modifiers
|
modifiers
|
||||||
|
|||||||
+17
-17
@@ -1,28 +1,28 @@
|
|||||||
/**
|
/**
|
||||||
h1. Notation
|
# Notation
|
||||||
|
|
||||||
This section informally explains the grammar notation used below.
|
This section informally explains the grammar notation used below.
|
||||||
|
|
||||||
h2. Symbols and naming
|
## Symbols and naming
|
||||||
|
|
||||||
_Terminal symbol_ names start with an uppercase letter, e.g. *SimpleName*
|
_Terminal symbol_ names start with an uppercase letter, e.g. **SimpleName**.<br>
|
||||||
_Nonterminal symbol_ names start with lowercase letter, e.g. *kotlinFile*
|
_Nonterminal symbol_ names start with lowercase letter, e.g. **kotlinFile**.<br>
|
||||||
Each _production_ starts with a colon (*:*)
|
Each _production_ starts with a colon (**:**).<br>
|
||||||
_Symbol definitions_ may have many productions and are terminated by a semicolon (*;*)
|
_Symbol definitions_ may have many productions and are terminated by a semicolon (**;**).<br>
|
||||||
Symbol definitions may be prepended with _attributes_, e.g. {{start}} attribute denotes a start symbol
|
Symbol definitions may be prepended with _attributes_, e.g. `start` attribute denotes a start symbol.
|
||||||
|
|
||||||
h2. EBNF expressions
|
## EBNF expressions
|
||||||
|
|
||||||
Operator {color:blue}*|*{color} denotes _alternative_
|
Operator `|` denotes _alternative_.<br>
|
||||||
Operator {color:blue}*\**{color} denotes _iteration_ (zero or more)
|
Operator `*` denotes _iteration_ (zero or more).<br>
|
||||||
Operator {color:blue}*+*{color} denotes _iteration_ (one or more)
|
Operator `+` denotes _iteration_ (one or more).<br>
|
||||||
Operator {color:blue}*?*{color} denotes _option_ (zero or one)
|
Operator `?` denotes _option_ (zero or one).<br>
|
||||||
alpha{color:blue}*{*{color}beta{color:blue}*}*{color} denotes a nonempty _beta_-separated list of _alpha_'s
|
alpha`{`beta`}` denotes a nonempty _beta_-separated list of _alpha_'s.
|
||||||
|
|
||||||
h1. Semicolons
|
# Semicolons
|
||||||
|
|
||||||
[Kotlin] provides "semicolon inference": syntactically, subsentences (e.g., statements, declarations etc) are separated by
|
Kotlin provides "semicolon inference": syntactically, subsentences (e.g., statements, declarations etc) are separated by
|
||||||
the pseudo-token [SEMI|#SEMI], which stands for "semicolon or newline". In most cases, there's no need for semicolons in
|
the pseudo-token [SEMI](#SEMI), which stands for "semicolon or newline". In most cases, there's no need for semicolons in
|
||||||
[Kotlin] code.
|
Kotlin code.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
h1. Syntax
|
# Syntax
|
||||||
|
|
||||||
*Relevant pages:* [Namespaces]
|
<!--Relevant pages: [Namespaces](namespaces.html)-->
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ import
|
|||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
bq. See [Imports|Namespaces#Imports]
|
<!--See [Imports](namespaces.html#imports)-->
|
||||||
*/
|
*/
|
||||||
|
|
||||||
toplevelObject
|
toplevelObject
|
||||||
@@ -48,7 +48,7 @@ package
|
|||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
bq. See [Namespaces]
|
<!--See [Namespaces](namespaces.html)-->
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[undocumented]
|
[undocumented]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
h2. Types
|
## Types
|
||||||
|
|
||||||
bq. See [Types]
|
See [Types](basic-types.html)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -14,6 +14,7 @@ Foo<Bar<X>, T, Object> // user type
|
|||||||
|
|
||||||
type
|
type
|
||||||
: annotations typeDescriptor
|
: annotations typeDescriptor
|
||||||
|
;
|
||||||
|
|
||||||
// IF YOU CHANGE THIS, please, update TYPE_FIRST in JetParsing
|
// IF YOU CHANGE THIS, please, update TYPE_FIRST in JetParsing
|
||||||
typeDescriptor
|
typeDescriptor
|
||||||
@@ -46,5 +47,3 @@ optionalProjection
|
|||||||
functionType
|
functionType
|
||||||
: (type ".")? "(" (parameter | modifiers /*lazy out ref*/ type){","} ")" "->" type?
|
: (type ".")? "(" (parameter | modifiers /*lazy out ref*/ type){","} ")" "->" type?
|
||||||
;
|
;
|
||||||
|
|
||||||
////////////////////////////////////////
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
h4. Pattern matching
|
#### Pattern matching
|
||||||
|
|
||||||
bq. See [Pattern matching]
|
<!--See [Pattern matching](pattern-matching.html)-->
|
||||||
*/
|
*/
|
||||||
|
|
||||||
when
|
when
|
||||||
|
|||||||
Reference in New Issue
Block a user