Skip to content

Commit

Permalink
Simplify annotation write
Browse files Browse the repository at this point in the history
  • Loading branch information
theEvilReaper committed Dec 16, 2024
1 parent e9673df commit fe5a60c
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import net.theevilreaper.dartpoet.type.ParameterizedTypeName.Companion.parameter
import net.theevilreaper.dartpoet.type.TypeName
import net.theevilreaper.dartpoet.util.*
import net.theevilreaper.dartpoet.util.EMPTY_STRING
import net.theevilreaper.dartpoet.util.NEW_LINE
import net.theevilreaper.dartpoet.util.SEMICOLON
import net.theevilreaper.dartpoet.util.SPACE
import net.theevilreaper.dartpoet.util.parameter.ParameterData
Expand All @@ -34,10 +33,7 @@ internal class FunctionWriter : Writeable<FunctionSpec>, DocumentationAppender {
override fun write(spec: FunctionSpec, writer: CodeWriter) {
emitDocumentation(spec.docs, writer)

if (spec.annotation.isNotEmpty()) {
spec.annotation.forEach { it.write(writer) }
writer.emit(NEW_LINE)
}
spec.annotation.emitAnnotations(codeWriter = writer)

if (spec.hasMethodAccessorType) {
this.writeMethodAccessorDefinition(spec, writer)
Expand Down Expand Up @@ -84,7 +80,6 @@ internal class FunctionWriter : Writeable<FunctionSpec>, DocumentationAppender {
true -> SPACE
else -> EMPTY_STRING
}

}

/**
Expand Down

0 comments on commit fe5a60c

Please sign in to comment.