blob: 6a34ddcfcdef10eb5271e2cf79b7da2454e0e167 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// SPDX-License-Identifier: Apache-2.0
package firrtl.stage
private[stage] sealed trait FileExtension
private[stage] case object FirrtlFile extends FileExtension
private[stage] case object ProtoBufFile extends FileExtension
/** Utilities that help with processing FIRRTL options */
object FirrtlStageUtils {
private[stage] def getFileExtension(file: String): FileExtension = file.drop(file.lastIndexOf('.')) match {
case ".pb" => ProtoBufFile
case _ => FirrtlFile
}
}
|