blob: a0dcc19406119ebb394368b91b5c4fdac2d20072 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
// See LICENSE for license details.
package firrtl
package object options {
implicit object StageOptionsView extends OptionsView[StageOptions] {
def view(options: AnnotationSeq): StageOptions = options
.collect { case a: StageOption => a }
.foldLeft(StageOptions())((c, x) =>
x match {
case TargetDirAnnotation(a) => c.copy(targetDir = a)
case InputAnnotationFileAnnotation(a) => c.copy(annotationFiles = a +: c.annotationFiles)
}
)
}
}
|