mirror of
https://github.com/sharkdp/bat
synced 2026-06-09 10:03:18 +00:00
Merge branch 'master' into master
This commit is contained in:
+3
-3
@@ -49,9 +49,6 @@
|
||||
[submodule "assets/themes/zenburn"]
|
||||
path = assets/themes/zenburn
|
||||
url = https://github.com/colinta/zenburn.git
|
||||
[submodule "assets/syntaxes/Kotlin"]
|
||||
path = assets/syntaxes/02_Extra/Kotlin
|
||||
url = https://github.com/vkostyukov/kotlin-sublime-package
|
||||
[submodule "assets/syntaxes/Elm"]
|
||||
path = assets/syntaxes/02_Extra/Elm
|
||||
url = https://github.com/elm-community/SublimeElmLanguageSupport
|
||||
@@ -281,3 +278,6 @@
|
||||
[submodule "assets/syntaxes/02_Extra/COBOL"]
|
||||
path = assets/syntaxes/02_Extra/COBOL
|
||||
url = https://github.com/adukhan99/sublime_cobol.git
|
||||
[submodule "assets/syntaxes/02_Extra/Kotlin"]
|
||||
path = assets/syntaxes/02_Extra/Kotlin
|
||||
url = https://github.com/guille/sublime-kotlin
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
- Fixed manpage syntax so that ANSI escape codes don't get incorrectly highlighted and thus broken, see #3586 (@BlueElectivire)
|
||||
- Map several Google Cloud CLI config files to their appropriate syntax #3635 (@victor-gp)
|
||||
- Map all ignore dotfiles to Git Ignore syntax #3636 (@victor-gp)
|
||||
- Improved Kotlin syntax, see #3699 (@guille)
|
||||
|
||||
## Themes
|
||||
|
||||
|
||||
Vendored
+1
-1
Submodule assets/syntaxes/02_Extra/Idris2 updated: bbfe50e023...4d8eb35a38
Vendored
+1
-1
Submodule assets/syntaxes/02_Extra/Kotlin updated: aeeed2780b...c353694169
-398
@@ -1,398 +0,0 @@
|
||||
%YAML 1.2
|
||||
---
|
||||
# http://www.sublimetext.com/docs/3/syntax.html
|
||||
name: Kotlin
|
||||
file_extensions:
|
||||
- kt
|
||||
- kts
|
||||
scope: source.Kotlin
|
||||
contexts:
|
||||
main:
|
||||
- include: comments
|
||||
- match: '^\s*(package)\b(?:\s*([^ ;$]+)\s*)?'
|
||||
captures:
|
||||
1: keyword.other.kotlin
|
||||
2: entity.name.package.kotlin
|
||||
- include: imports
|
||||
- include: statements
|
||||
classes:
|
||||
- match: (?<!::)(?=\b(?:companion|class|object|interface)\b)
|
||||
push:
|
||||
- match: '(?=$|\})'
|
||||
pop: true
|
||||
- include: comments
|
||||
- match: \b(companion\s*)?(class|object|interface)\b
|
||||
captures:
|
||||
1: storage.modifier.kotlin
|
||||
2: storage.modifier.kotlin
|
||||
push:
|
||||
- match: '(?=<|\{|\(|:|$)'
|
||||
pop: true
|
||||
- include: comments
|
||||
- match: \w+
|
||||
scope: entity.name.type.class.kotlin
|
||||
- match: <
|
||||
push:
|
||||
- match: ">"
|
||||
pop: true
|
||||
- include: generics
|
||||
- match: \(
|
||||
push:
|
||||
- match: \)
|
||||
pop: true
|
||||
- include: parameters
|
||||
- match: (:)
|
||||
captures:
|
||||
1: keyword.operator.declaration.kotlin
|
||||
push:
|
||||
- match: "(?={|$)"
|
||||
pop: true
|
||||
- match: \w+
|
||||
scope: entity.other.inherited-class.kotlin
|
||||
- match: \(
|
||||
push:
|
||||
- match: \)
|
||||
pop: true
|
||||
- include: expressions
|
||||
- match: '\{'
|
||||
push:
|
||||
- match: '\}'
|
||||
pop: true
|
||||
- include: statements
|
||||
comments:
|
||||
- match: /\*
|
||||
captures:
|
||||
0: punctuation.definition.comment.kotlin
|
||||
push:
|
||||
- meta_scope: comment.block.kotlin
|
||||
- match: \*/
|
||||
captures:
|
||||
0: punctuation.definition.comment.kotlin
|
||||
pop: true
|
||||
- match: \s*((//).*$\n?)
|
||||
captures:
|
||||
1: comment.line.double-slash.kotlin
|
||||
2: punctuation.definition.comment.kotlin
|
||||
constants:
|
||||
- match: \b(true|false|null|this|super)\b
|
||||
scope: constant.language.kotlin
|
||||
- match: '\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)([LlFf])?\b'
|
||||
scope: constant.numeric.kotlin
|
||||
- match: '\b([A-Z][A-Z0-9_]+)\b'
|
||||
scope: constant.other.kotlin
|
||||
expressions:
|
||||
- match: \(
|
||||
push:
|
||||
- match: \)
|
||||
pop: true
|
||||
- include: expressions
|
||||
- include: types
|
||||
- include: strings
|
||||
- include: constants
|
||||
- include: comments
|
||||
- include: keywords
|
||||
functions:
|
||||
- match: (?=\s*\b(?:fun)\b)
|
||||
push:
|
||||
- match: '(?=$|\})'
|
||||
pop: true
|
||||
- match: \b(fun)\b
|
||||
captures:
|
||||
1: keyword.other.kotlin
|
||||
push:
|
||||
- match: (?=\()
|
||||
pop: true
|
||||
- match: <
|
||||
push:
|
||||
- match: ">"
|
||||
pop: true
|
||||
- include: generics
|
||||
- match: '([\.<\?>\w]+\.)?(\w+)'
|
||||
captures:
|
||||
2: entity.name.function.kotlin
|
||||
- match: \(
|
||||
push:
|
||||
- match: \)
|
||||
pop: true
|
||||
- include: parameters
|
||||
- match: (:)
|
||||
captures:
|
||||
1: keyword.operator.declaration.kotlin
|
||||
push:
|
||||
- match: "(?={|=|$)"
|
||||
pop: true
|
||||
- include: types
|
||||
- match: '\{'
|
||||
push:
|
||||
- match: '(?=\})'
|
||||
pop: true
|
||||
- include: statements
|
||||
- match: (=)
|
||||
captures:
|
||||
1: keyword.operator.assignment.kotlin
|
||||
push:
|
||||
- match: (?=$)
|
||||
pop: true
|
||||
- include: expressions
|
||||
generics:
|
||||
- match: (:)
|
||||
captures:
|
||||
1: keyword.operator.declaration.kotlin
|
||||
push:
|
||||
- match: (?=,|>)
|
||||
pop: true
|
||||
- include: types
|
||||
- include: keywords
|
||||
- match: \w+
|
||||
scope: storage.type.generic.kotlin
|
||||
getters-and-setters:
|
||||
- match: \b(get)\b\s*\(\s*\)
|
||||
captures:
|
||||
1: entity.name.function.kotlin
|
||||
push:
|
||||
- match: '\}|(?=\bset\b)|$'
|
||||
pop: true
|
||||
- match: (=)
|
||||
captures:
|
||||
1: keyword.operator.assignment.kotlin
|
||||
push:
|
||||
- match: (?=$|\bset\b)
|
||||
pop: true
|
||||
- include: expressions
|
||||
- match: '\{'
|
||||
push:
|
||||
- match: '\}'
|
||||
pop: true
|
||||
- include: expressions
|
||||
- match: \b(set)\b\s*(?=\()
|
||||
captures:
|
||||
1: entity.name.function.kotlin
|
||||
push:
|
||||
- match: '\}|(?=\bget\b)|$'
|
||||
pop: true
|
||||
- match: \(
|
||||
push:
|
||||
- match: \)
|
||||
pop: true
|
||||
- include: parameters
|
||||
- match: (=)
|
||||
captures:
|
||||
1: keyword.operator.assignment.kotlin
|
||||
push:
|
||||
- match: (?=$|\bset\b)
|
||||
pop: true
|
||||
- include: expressions
|
||||
- match: '\{'
|
||||
push:
|
||||
- match: '\}'
|
||||
pop: true
|
||||
- include: expressions
|
||||
imports:
|
||||
- match: '^\s*(import)\s+[^ $]+\s+(as)?'
|
||||
captures:
|
||||
1: keyword.other.kotlin
|
||||
2: keyword.other.kotlin
|
||||
keywords:
|
||||
- match: \b(var|val|public|private|protected|abstract|final|sealed|enum|open|attribute|annotation|override|inline|vararg|in|out|internal|data|tailrec|operator|infix|const|yield|typealias|typeof|reified|suspend)\b
|
||||
scope: storage.modifier.kotlin
|
||||
- match: \b(try|catch|finally|throw)\b
|
||||
scope: keyword.control.catch-exception.kotlin
|
||||
- match: \b(if|else|while|for|do|return|when|where|break|continue)\b
|
||||
scope: keyword.control.kotlin
|
||||
- match: \b(in|is|!in|!is|as|as\?|assert)\b
|
||||
scope: keyword.operator.kotlin
|
||||
- match: (==|!=|===|!==|<=|>=|<|>)
|
||||
scope: keyword.operator.comparison.kotlin
|
||||
- match: (=)
|
||||
scope: keyword.operator.assignment.kotlin
|
||||
- match: (::)
|
||||
scope: keyword.operator.kotlin
|
||||
- match: (:)
|
||||
scope: keyword.operator.declaration.kotlin
|
||||
- match: \b(by)\b
|
||||
scope: keyword.other.by.kotlin
|
||||
- match: (\?\.)
|
||||
scope: keyword.operator.safenav.kotlin
|
||||
- match: (\.)
|
||||
scope: keyword.operator.dot.kotlin
|
||||
- match: (\?:)
|
||||
scope: keyword.operator.elvis.kotlin
|
||||
- match: (\-\-|\+\+)
|
||||
scope: keyword.operator.increment-decrement.kotlin
|
||||
- match: (\+=|\-=|\*=|\/=)
|
||||
scope: keyword.operator.arithmetic.assign.kotlin
|
||||
- match: (\.\.)
|
||||
scope: keyword.operator.range.kotlin
|
||||
- match: (\-|\+|\*|\/|%)
|
||||
scope: keyword.operator.arithmetic.kotlin
|
||||
- match: (!|&&|\|\|)
|
||||
scope: keyword.operator.logical.kotlin
|
||||
- match: (;)
|
||||
scope: punctuation.terminator.kotlin
|
||||
namespaces:
|
||||
- match: \b(namespace)\b
|
||||
scope: keyword.other.kotlin
|
||||
- match: '\{'
|
||||
push:
|
||||
- match: '\}'
|
||||
pop: true
|
||||
- include: statements
|
||||
parameters:
|
||||
- match: (:)
|
||||
captures:
|
||||
1: keyword.operator.declaration.kotlin
|
||||
push:
|
||||
- match: (?=,|\)|=)
|
||||
pop: true
|
||||
- include: types
|
||||
- match: (=)
|
||||
captures:
|
||||
1: keyword.operator.declaration.kotlin
|
||||
push:
|
||||
- match: (?=,|\))
|
||||
pop: true
|
||||
- include: expressions
|
||||
- include: keywords
|
||||
- match: \w+
|
||||
scope: variable.parameter.function.kotlin
|
||||
statements:
|
||||
- include: namespaces
|
||||
- include: typedefs
|
||||
- include: classes
|
||||
- include: functions
|
||||
- include: variables
|
||||
- include: getters-and-setters
|
||||
- include: expressions
|
||||
strings:
|
||||
- match: '"""'
|
||||
captures:
|
||||
0: punctuation.definition.string.begin.kotlin
|
||||
push:
|
||||
- meta_scope: string.quoted.third.kotlin
|
||||
- match: '"""'
|
||||
captures:
|
||||
0: punctuation.definition.string.end.kotlin
|
||||
pop: true
|
||||
- match: '(\$\w+|\$\{[^\}]+\})'
|
||||
scope: variable.parameter.template.kotlin
|
||||
- match: \\.
|
||||
scope: constant.character.escape.kotlin
|
||||
- match: '"'
|
||||
captures:
|
||||
0: punctuation.definition.string.begin.kotlin
|
||||
push:
|
||||
- meta_scope: string.quoted.double.kotlin
|
||||
- match: '"'
|
||||
captures:
|
||||
0: punctuation.definition.string.end.kotlin
|
||||
pop: true
|
||||
- match: '(\$\w+|\$\{[^\}]+\})'
|
||||
scope: variable.parameter.template.kotlin
|
||||
- match: \\.
|
||||
scope: constant.character.escape.kotlin
|
||||
- match: "'"
|
||||
captures:
|
||||
0: punctuation.definition.string.begin.kotlin
|
||||
push:
|
||||
- meta_scope: string.quoted.single.kotlin
|
||||
- match: "'"
|
||||
captures:
|
||||
0: punctuation.definition.string.end.kotlin
|
||||
pop: true
|
||||
- match: \\.
|
||||
scope: constant.character.escape.kotlin
|
||||
- match: "`"
|
||||
captures:
|
||||
0: punctuation.definition.string.begin.kotlin
|
||||
push:
|
||||
- meta_scope: string.quoted.single.kotlin
|
||||
- match: "`"
|
||||
captures:
|
||||
0: punctuation.definition.string.end.kotlin
|
||||
pop: true
|
||||
typedefs:
|
||||
- match: (?=\s*(?:type))
|
||||
push:
|
||||
- match: (?=$)
|
||||
pop: true
|
||||
- match: \b(type)\b
|
||||
scope: keyword.other.kotlin
|
||||
- match: <
|
||||
push:
|
||||
- match: ">"
|
||||
pop: true
|
||||
- include: generics
|
||||
- include: expressions
|
||||
types:
|
||||
- match: \b(Nothing|Any|Unit|String|CharSequence|Int|Boolean|Char|Long|Double|Float|Short|Byte|dynamic)\b
|
||||
scope: storage.type.buildin.kotlin
|
||||
- match: \b(IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray)\b
|
||||
scope: storage.type.buildin.array.kotlin
|
||||
- match: \b(Array|Collection|List|Map|Set|MutableList|MutableMap|MutableSet|Sequence)<\b
|
||||
captures:
|
||||
1: storage.type.buildin.collection.kotlin
|
||||
push:
|
||||
- match: ">"
|
||||
pop: true
|
||||
- include: types
|
||||
- include: keywords
|
||||
- match: \w+<
|
||||
push:
|
||||
- match: ">"
|
||||
pop: true
|
||||
- include: types
|
||||
- include: keywords
|
||||
- match: '\{'
|
||||
push:
|
||||
- match: '\}'
|
||||
pop: true
|
||||
- include: statements
|
||||
- match: \(
|
||||
push:
|
||||
- match: \)
|
||||
pop: true
|
||||
- include: types
|
||||
- match: (->)
|
||||
scope: keyword.operator.declaration.kotlin
|
||||
variables:
|
||||
- match: (?=\s*\b(?:var|val)\b)
|
||||
push:
|
||||
- match: (?=:|=|(\b(by)\b)|$)
|
||||
pop: true
|
||||
- match: \b(var|val)\b
|
||||
captures:
|
||||
1: keyword.other.kotlin
|
||||
push:
|
||||
- match: (?=:|=|(\b(by)\b)|$)
|
||||
pop: true
|
||||
- match: <
|
||||
push:
|
||||
- match: ">"
|
||||
pop: true
|
||||
- include: generics
|
||||
- match: '([\.<\?>\w]+\.)?(\w+)'
|
||||
captures:
|
||||
2: entity.name.variable.kotlin
|
||||
- match: (:)
|
||||
captures:
|
||||
1: keyword.operator.declaration.kotlin
|
||||
push:
|
||||
- match: (?==|$)
|
||||
pop: true
|
||||
- include: types
|
||||
- include: getters-and-setters
|
||||
- match: \b(by)\b
|
||||
captures:
|
||||
1: keyword.other.kotlin
|
||||
push:
|
||||
- match: (?=$)
|
||||
pop: true
|
||||
- include: expressions
|
||||
- match: (=)
|
||||
captures:
|
||||
1: keyword.operator.assignment.kotlin
|
||||
push:
|
||||
- match: (?=$)
|
||||
pop: true
|
||||
- include: expressions
|
||||
- include: getters-and-setters
|
||||
+52
-52
@@ -1,85 +1,85 @@
|
||||
[38;2;249;38;114mimport[0m[38;2;248;248;242m kotlin.math.*[0m
|
||||
[38;2;249;38;114mimport[0m[38;2;248;248;242m [0m[38;2;248;248;242mkotlin[0m[38;2;248;248;242m.[0m[38;2;248;248;242mmath[0m[38;2;248;248;242m.[0m[38;2;249;38;114m*[0m
|
||||
|
||||
[38;2;249;38;114mdata[0m[38;2;248;248;242m [0m[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[38;2;166;226;46mExample[0m[38;2;248;248;242m([0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mname[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mString[0m[38;2;248;248;242m,[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mnumbers[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mList[0m[38;2;248;248;242m<[0m[3;38;2;102;217;239mInt[0m[38;2;248;248;242m?>[0m
|
||||
[38;2;249;38;114mdata[0m[38;2;248;248;242m [0m[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mExample[0m[38;2;248;248;242m([0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mname[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mString[0m[38;2;248;248;242m,[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mnumbers[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mList[0m[38;2;248;248;242m<[0m[3;38;2;166;226;46mInt[0m[38;2;249;38;114m?[0m[38;2;248;248;242m>[0m
|
||||
[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46minterface[0m[38;2;248;248;242m [0m[38;2;166;226;46mJokeInterface[0m[38;2;248;248;242m {[0m
|
||||
[38;2;248;248;242m [0m[38;2;166;226;46mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46misFunny[0m[38;2;248;248;242m()[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mBoolean[0m
|
||||
[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46minterface[0m[38;2;248;248;242m [0m[38;2;248;248;242mJokeInterface[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46misFunny[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mBoolean[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;249;38;114mabstract[0m[38;2;248;248;242m [0m[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[38;2;166;226;46mAbstractJoke[0m[38;2;248;248;242m [0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;4;38;2;166;226;46mJokeInterface[0m[38;2;248;248;242m {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46misFunny[0m[38;2;248;248;242m() [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;190;132;255mfalse[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mabstract[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46mcontent[0m[38;2;248;248;242m()[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mString[0m
|
||||
[38;2;249;38;114mabstract[0m[38;2;248;248;242m [0m[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mAbstractJoke[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mJokeInterface[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46misFunny[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;190;132;255mfalse[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mabstract[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46mcontent[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mString[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[38;2;166;226;46mJoke[0m[38;2;248;248;242m [0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;4;38;2;166;226;46mAbstractJoke[0m[38;2;248;248;242m() {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46misFunny[0m[38;2;248;248;242m()[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mBoolean[0m[38;2;248;248;242m {[0m
|
||||
[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mJoke[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mAbstractJoke[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46misFunny[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mBoolean[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mreturn[0m[38;2;248;248;242m [0m[38;2;190;132;255mtrue[0m
|
||||
[38;2;248;248;242m }[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46mcontent[0m[38;2;248;248;242m()[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mString[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mcontent of joke here, haha[0m[38;2;230;219;116m"[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m}[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46mcontent[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mString[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mcontent of joke here, haha[0m[38;2;230;219;116m"[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[38;2;166;226;46mDelegatedJoke[0m[38;2;248;248;242m([0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mjoke[0m[38;2;249;38;114m:[0m[38;2;248;248;242m Joke) [0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;4;38;2;166;226;46mJokeInterface[0m[38;2;248;248;242m [0m[3;4;38;2;166;226;46mby[0m[38;2;248;248;242m [0m[3;4;38;2;166;226;46mjoke[0m[38;2;248;248;242m {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[38;2;166;226;46mnumber[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mLong[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;190;132;255m123L[0m
|
||||
[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mDelegatedJoke[0m[38;2;248;248;242m([0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mjoke[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mJoke[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mJokeInterface[0m[38;2;248;248;242m [0m[38;2;249;38;114mby[0m[38;2;248;248;242m [0m[38;2;255;255;255mjoke[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[38;2;255;255;255mnumber[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mLong[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;190;132;255m123L[0m
|
||||
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mcompanion [0m[38;2;249;38;114mobject[0m[38;2;248;248;242m {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mconst[0m[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[38;2;166;226;46msomeConstant[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116msome constant text[0m[38;2;230;219;116m"[0m
|
||||
[38;2;248;248;242m }[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mcompanion[0m[38;2;248;248;242m [0m[38;2;249;38;114mobject[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mconst[0m[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[38;2;255;255;255msomeConstant[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116msome constant text[0m[38;2;230;219;116m"[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m}[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;249;38;114mobject[0m[38;2;248;248;242m [0m[38;2;166;226;46mSomeSingleton[0m
|
||||
[38;2;249;38;114mobject[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mSomeSingleton[0m
|
||||
|
||||
[38;2;249;38;114msealed[0m[38;2;248;248;242m [0m[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[38;2;166;226;46mShape[0m[38;2;248;248;242m {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mabstract[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46marea[0m[38;2;248;248;242m()[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mDouble[0m
|
||||
[38;2;249;38;114msealed[0m[38;2;248;248;242m [0m[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mShape[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mabstract[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46marea[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mDouble[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;249;38;114mdata[0m[38;2;248;248;242m [0m[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[38;2;166;226;46mSquare[0m[38;2;248;248;242m([0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31msideLength[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mDouble[0m[38;2;248;248;242m) [0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;4;38;2;166;226;46mShape[0m[38;2;248;248;242m() {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46marea[0m[38;2;248;248;242m()[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mDouble[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m sideLength[0m[38;2;249;38;114m.[0m[38;2;248;248;242mpow([0m[38;2;190;132;255m2[0m[38;2;248;248;242m)[0m
|
||||
[38;2;249;38;114mdata[0m[38;2;248;248;242m [0m[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mSquare[0m[38;2;248;248;242m([0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31msideLength[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mDouble[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mShape[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46marea[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mDouble[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;255;255;255msideLength[0m[38;2;248;248;242m.[0m[38;2;248;248;242mpow[0m[38;2;248;248;242m([0m[38;2;190;132;255m2[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;249;38;114mobject[0m[38;2;248;248;242m [0m[38;2;166;226;46mPoint[0m[38;2;248;248;242m [0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;4;38;2;166;226;46mShape[0m[38;2;248;248;242m() {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46marea[0m[38;2;248;248;242m() [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;190;132;255m0[0m
|
||||
[38;2;249;38;114mobject[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mPoint[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mShape[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46marea[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;190;132;255m.0[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[38;2;166;226;46mCircle[0m[38;2;248;248;242m([0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mradius[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mDouble[0m[38;2;248;248;242m) [0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;4;38;2;166;226;46mShape[0m[38;2;248;248;242m() {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46marea[0m[38;2;248;248;242m()[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mDouble[0m[38;2;248;248;242m {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mreturn[0m[38;2;248;248;242m [0m[38;2;190;132;255mPI[0m[38;2;248;248;242m [0m[38;2;249;38;114m*[0m[38;2;248;248;242m radius [0m[38;2;249;38;114m*[0m[38;2;248;248;242m radius[0m
|
||||
[38;2;248;248;242m }[0m
|
||||
[38;2;249;38;114mclass[0m[38;2;248;248;242m [0m[4;38;2;102;217;239mCircle[0m[38;2;248;248;242m([0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mradius[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mDouble[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mShape[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114moverride[0m[38;2;248;248;242m [0m[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46marea[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mDouble[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mreturn[0m[38;2;248;248;242m [0m[38;2;255;255;255mPI[0m[38;2;248;248;242m [0m[38;2;249;38;114m*[0m[38;2;248;248;242m [0m[38;2;255;255;255mradius[0m[38;2;248;248;242m [0m[38;2;249;38;114m*[0m[38;2;248;248;242m [0m[38;2;255;255;255mradius[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m}[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;249;38;114mfun[0m[38;2;248;248;242m String.[0m[38;2;166;226;46mextensionMethod[0m[38;2;248;248;242m() [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mtest[0m[38;2;230;219;116m"[0m
|
||||
[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mString[0m[38;2;248;248;242m.[0m[38;2;166;226;46mextensionMethod[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mtest[0m[38;2;230;219;116m"[0m
|
||||
|
||||
[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46mmain[0m[38;2;248;248;242m() {[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[38;2;166;226;46mname[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m"""[0m
|
||||
[38;2;249;38;114mfun[0m[38;2;248;248;242m [0m[38;2;166;226;46mmain[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[38;2;255;255;255mname[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;230;219;116m"""[0m
|
||||
[38;2;230;219;116m multiline[0m
|
||||
[38;2;230;219;116m string[0m
|
||||
[38;2;230;219;116m [0m
|
||||
[38;2;230;219;116m some numbers: 123123 42[0m
|
||||
[38;2;230;219;116m [0m[38;2;230;219;116m"""[0m[38;2;249;38;114m.[0m[38;2;248;248;242mtrimIndent()[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[38;2;166;226;46mexample[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m Example(name [0m[38;2;249;38;114m=[0m[38;2;248;248;242m name, numbers [0m[38;2;249;38;114m=[0m[38;2;248;248;242m listOf([0m[38;2;190;132;255m512[0m[38;2;248;248;242m, [0m[38;2;190;132;255m42[0m[38;2;248;248;242m, [0m[38;2;190;132;255mnull[0m[38;2;248;248;242m, [0m[38;2;249;38;114m-[0m[38;2;190;132;255m1[0m[38;2;248;248;242m))[0m
|
||||
[38;2;230;219;116m [0m[38;2;230;219;116m"""[0m[38;2;248;248;242m.[0m[38;2;248;248;242mtrimIndent[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114mval[0m[38;2;248;248;242m [0m[38;2;255;255;255mexample[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;248;248;242mExample[0m[38;2;248;248;242m([0m[38;2;255;255;255mname[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;255;255;255mname[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;255;255;255mnumbers[0m[38;2;248;248;242m [0m[38;2;249;38;114m=[0m[38;2;248;248;242m [0m[38;2;248;248;242mlistOf[0m[38;2;248;248;242m([0m[38;2;190;132;255m512[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255m42[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;190;132;255mnull[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;249;38;114m-[0m[38;2;190;132;255m1[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;248;248;242m example[0m[38;2;249;38;114m.[0m[38;2;248;248;242mnumbers[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;248;248;242mfilterNotNull()[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;248;248;242mforEach { println(it) }[0m
|
||||
[38;2;248;248;242m [0m[38;2;255;255;255mexample[0m[38;2;248;248;242m.[0m[38;2;255;255;255mnumbers[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m.[0m[38;2;248;248;242mfilterNotNull[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m.[0m[38;2;248;248;242mforEach[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m[38;2;248;248;242m [0m[38;2;248;248;242mprintln[0m[38;2;248;248;242m([0m[38;2;255;255;255mit[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;248;248;242m setOf(Joke(), DelegatedJoke(Joke())[0m[38;2;249;38;114m.[0m[38;2;248;248;242mjoke)[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;248;248;242mfilter(JokeInterface[0m[38;2;249;38;114m::[0m[38;2;248;248;242misFunny)[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;248;248;242mmap(AbstractJoke[0m[38;2;249;38;114m::[0m[38;2;248;248;242mcontent)[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;248;248;242mforEachIndexed { index[0m[38;2;249;38;114m:[0m[38;2;248;248;242m [0m[3;38;2;102;217;239mInt[0m[38;2;248;248;242m, joke [0m[38;2;249;38;114m->[0m
|
||||
[38;2;248;248;242m println([0m[38;2;230;219;116m"[0m[38;2;230;219;116mI heard a funny joke(#[0m[3;38;2;253;151;31m${index + 1}[0m[38;2;230;219;116m): [0m[3;38;2;253;151;31m$joke[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m }[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242msetOf[0m[38;2;248;248;242m([0m[38;2;248;248;242mJoke[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;248;248;242mDelegatedJoke[0m[38;2;248;248;242m([0m[38;2;248;248;242mJoke[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m[38;2;248;248;242m.[0m[38;2;255;255;255mjoke[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m.[0m[38;2;248;248;242mfilter[0m[38;2;248;248;242m([0m[38;2;255;255;255mJokeInterface[0m[38;2;248;248;242m::[0m[38;2;248;248;242misFunny[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m.[0m[38;2;248;248;242mmap[0m[38;2;248;248;242m([0m[38;2;255;255;255mAbstractJoke[0m[38;2;248;248;242m::[0m[38;2;248;248;242mcontent[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m.[0m[38;2;248;248;242mforEachIndexed[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m[38;2;248;248;242m [0m[38;2;255;255;255mindex[0m[38;2;248;248;242m:[0m[38;2;248;248;242m [0m[3;38;2;166;226;46mInt[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[3;38;2;253;151;31mjoke[0m[38;2;248;248;242m [0m[38;2;249;38;114m->[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242mprintln[0m[38;2;248;248;242m([0m[38;2;230;219;116m"[0m[38;2;230;219;116mI heard a funny joke(#[0m[38;2;248;248;242m${[0m[38;2;255;255;255mindex[0m[38;2;248;248;242m [0m[38;2;249;38;114m+[0m[38;2;248;248;242m [0m[38;2;190;132;255m1[0m[38;2;248;248;242m}[0m[38;2;230;219;116m): [0m[38;2;255;255;255m$joke[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;248;248;242m listOf(Square([0m[38;2;190;132;255m12.3[0m[38;2;248;248;242m), Point, Circle([0m[38;2;190;132;255m5.2[0m[38;2;248;248;242m))[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;248;248;242massociateWith(Shape[0m[38;2;249;38;114m::[0m[38;2;248;248;242marea)[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;248;248;242mtoList()[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;248;248;242msortedBy { it[0m[38;2;249;38;114m.[0m[38;2;248;248;242msecond }[0m
|
||||
[38;2;248;248;242m [0m[38;2;249;38;114m.[0m[38;2;248;248;242mforEach {[0m
|
||||
[38;2;248;248;242m println([0m[38;2;230;219;116m"[0m[3;38;2;253;151;31m${it.first}[0m[38;2;230;219;116m: [0m[3;38;2;253;151;31m${it.second}[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m }[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242mlistOf[0m[38;2;248;248;242m([0m[38;2;248;248;242mSquare[0m[38;2;248;248;242m([0m[38;2;190;132;255m12.3[0m[38;2;248;248;242m)[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;255;255;255mPoint[0m[38;2;248;248;242m,[0m[38;2;248;248;242m [0m[38;2;248;248;242mCircle[0m[38;2;248;248;242m([0m[38;2;190;132;255m5.2[0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m.[0m[38;2;248;248;242massociateWith[0m[38;2;248;248;242m([0m[38;2;255;255;255mShape[0m[38;2;248;248;242m::[0m[38;2;248;248;242marea[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m.[0m[38;2;248;248;242mtoList[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m.[0m[38;2;248;248;242msortedBy[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m[38;2;248;248;242m [0m[38;2;255;255;255mit[0m[38;2;248;248;242m.[0m[38;2;255;255;255msecond[0m[38;2;248;248;242m [0m[38;2;248;248;242m}[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m.[0m[38;2;248;248;242mforEach[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242mprintln[0m[38;2;248;248;242m([0m[38;2;230;219;116m"[0m[38;2;248;248;242m${[0m[38;2;255;255;255mit[0m[38;2;248;248;242m.[0m[38;2;255;255;255mfirst[0m[38;2;248;248;242m}[0m[38;2;230;219;116m: [0m[38;2;248;248;242m${[0m[38;2;255;255;255mit[0m[38;2;248;248;242m.[0m[38;2;255;255;255msecond[0m[38;2;248;248;242m}[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242m}[0m
|
||||
|
||||
[38;2;248;248;242m println([0m[38;2;230;219;116m"[0m[38;2;230;219;116msome string[0m[38;2;230;219;116m"[0m[38;2;249;38;114m.[0m[38;2;248;248;242mextensionMethod())[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242mprintln[0m[38;2;248;248;242m([0m[38;2;230;219;116m"[0m[38;2;230;219;116msome string[0m[38;2;230;219;116m"[0m[38;2;248;248;242m.[0m[38;2;248;248;242mextensionMethod[0m[38;2;248;248;242m([0m[38;2;248;248;242m)[0m[38;2;248;248;242m)[0m
|
||||
|
||||
[38;2;248;248;242m require(SomeSingleton[0m[38;2;249;38;114m::[0m[38;2;248;248;242mclass[0m[38;2;249;38;114m.[0m[38;2;248;248;242msimpleName [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mSomeSingletonName[0m[38;2;230;219;116m"[0m[38;2;248;248;242m) { [0m[38;2;230;219;116m"[0m[38;2;230;219;116msomething does not seem right...[0m[38;2;230;219;116m"[0m[38;2;248;248;242m }[0m
|
||||
[38;2;248;248;242m [0m[38;2;248;248;242mrequire[0m[38;2;248;248;242m([0m[38;2;255;255;255mSomeSingleton[0m[38;2;248;248;242m::[0m[38;2;249;38;114mclass[0m[38;2;248;248;242m.[0m[38;2;255;255;255msimpleName[0m[38;2;248;248;242m [0m[38;2;249;38;114m==[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116mSomeSingletonName[0m[38;2;230;219;116m"[0m[38;2;248;248;242m)[0m[38;2;248;248;242m [0m[38;2;248;248;242m{[0m[38;2;248;248;242m [0m[38;2;230;219;116m"[0m[38;2;230;219;116msomething does not seem right...[0m[38;2;230;219;116m"[0m[38;2;248;248;242m [0m[38;2;248;248;242m}[0m
|
||||
[38;2;248;248;242m}[0m
|
||||
|
||||
Reference in New Issue
Block a user