-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
ac13b3a
commit ced28f1
Showing
8 changed files
with
124 additions
and
44 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
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
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
53 changes: 53 additions & 0 deletions
53
kodex-example-gradle-project-jvm/src/main/kotlin/nl/jolanrensen/example/tagsDemo.kt
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,53 @@ | ||
package nl.jolanrensen.example | ||
|
||
/** | ||
* Our data looks something like this: | ||
* | ||
* ```json | ||
* {@includeFile (../../../../resources/test.json)} | ||
* ``` | ||
*/ | ||
interface IncludeFileDemo | ||
|
||
/** | ||
* Hello {@get name World}, today is {@get day unknown day}! | ||
* | ||
* @set day Friday | ||
*/ | ||
interface GetSetDemo1 | ||
|
||
/** | ||
* Hello $name=World, today is ${day=unknown day}! | ||
* | ||
* @set day Friday | ||
*/ | ||
interface GetSetDemo2 | ||
|
||
/** | ||
* Fibonacci in Kotlin: | ||
* @sample [fibonacciUsingIteration] | ||
*/ | ||
interface SampleDemo | ||
|
||
fun fibonacciUsingIteration(num: Int): Int { | ||
// SampleStart | ||
var a = 0 | ||
var b = 1 | ||
var tmp: Int | ||
for (i in 2..num) { | ||
tmp = a + b | ||
a = b | ||
b = tmp | ||
} | ||
return b | ||
// SampleEnd | ||
} | ||
|
||
/** | ||
* That will be \$5.00 | ||
* | ||
* To filter a list in Kotlin, you can call $example. | ||
* | ||
* {@set example `list.filter { it > 1 \}`} | ||
*/ | ||
interface EscapeCharDemo |
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