File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
src/main/kotlin/ca/voidstarzero/isbd/titlestatement Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -15,15 +15,14 @@ java {
15
15
}
16
16
17
17
dokka {
18
- outputFormat = ' html'
18
+ outputFormat = ' html-as-java '
19
19
outputDirectory = " $buildDir /dokka"
20
20
}
21
21
22
22
task javadocJar (type : Jar ) {
23
23
archiveClassifier = ' javadoc'
24
24
dependsOn dokka
25
- from(" $buildDir /dokka/isbd-parser" )
26
- from(" $buildDir /dokka/style.css" )
25
+ from(" $buildDir /dokka/" )
27
26
}
28
27
29
28
publishing {
@@ -95,6 +94,7 @@ repositories {
95
94
96
95
dependencies {
97
96
implementation ' org.jetbrains.kotlin:kotlin-stdlib-jdk8'
97
+ implementation ' com.fasterxml.jackson.module:jackson-module-kotlin:2.12.1'
98
98
api ' com.github.norswap:autumn:80abd5c207'
99
99
testImplementation ' junit:junit:4.12'
100
100
}
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ class TitleStatementParser : TitleStatementGrammar() {
62
62
return result.value_stack.mapNotNull { it as TitleStatement }
63
63
}
64
64
65
- throw Exception (result.toString() )
65
+ return emptyList( )
66
66
}
67
67
68
68
/* * Produces all possible parses of the given title statement string.
Original file line number Diff line number Diff line change 1
1
package ca.voidstarzero.isbd.titlestatement.ast
2
2
3
+ import com.fasterxml.jackson.annotation.JsonTypeInfo
4
+
3
5
/* *
4
6
* Base class for titles.
5
7
*/
6
- sealed class Title () : Node() {}
8
+ @JsonTypeInfo(
9
+ use = JsonTypeInfo .Id .NAME ,
10
+ include = JsonTypeInfo .As .EXISTING_PROPERTY ,
11
+ property = " type"
12
+ )
13
+ sealed class Title () : Node() {
14
+ val type = this ::class .java.simpleName
15
+ }
7
16
8
17
/* *
9
18
* A class holding the title part of a title statement.
You can’t perform that action at this time.
0 commit comments