mbeckerle commented on a change in pull request #83: Adding value of 'bcd' to
binaryCalendarRep
URL: https://github.com/apache/incubator-daffodil/pull/83#discussion_r203411185
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/processors/parsers/PrimitivesDateTime1.scala
##########
@@ -82,26 +93,15 @@ abstract class ConvertTextCalendarProcessorBase(
}
}
-case class ConvertTextCalendarParser(erd: ElementRuntimeData,
- xsdType: String,
- prettyType: String,
- pattern: String,
- hasTZ: Boolean,
- localeEv: CalendarLanguageEv,
- calendarEv: CalendarEv)
- extends ConvertTextCalendarProcessorBase(erd, pattern)
- with TextPrimParser {
-
- override lazy val runtimeDependencies = List(localeEv, calendarEv)
-
- def parse(start: PState): Unit = {
- val node = start.simpleElement
- val str = node.dataValueAsString
-
- Assert.invariant(str != null)
+trait CalendarParser extends PrimParser with ConvertTextCalendarProcessorBase {
+ def localeEv: CalendarLanguageEv
+ def calendarEv: CalendarEv
+ def xsdType: String
+ def prettyType: String
+ def hasTZ: Boolean
+ def writeResult (start: PState, toWrite: String) {
Review comment:
I reserve "write" for I/O operations. Suggest "assign" or "set" instead of
"write" when filling in a data structure.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services