summaryrefslogtreecommitdiff
path: root/core/src/main/scala/chisel3/StrongEnum.scala
diff options
context:
space:
mode:
authorAlbert Magyar2020-07-20 12:11:44 -0700
committerAlbert Magyar2020-07-21 13:06:53 -0700
commit7e9f424fb7dcd11c894ceb9f6f049fd9eda80632 (patch)
tree1fa15e357d0af7b82316fa2ee659e2e98118488c /core/src/main/scala/chisel3/StrongEnum.scala
parent4a0e828cfe76e0d3bd6c4a0cc593589fe74ed0ba (diff)
Delete outdated scalastyle configuration comments from source
Diffstat (limited to 'core/src/main/scala/chisel3/StrongEnum.scala')
-rw-r--r--core/src/main/scala/chisel3/StrongEnum.scala12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/src/main/scala/chisel3/StrongEnum.scala b/core/src/main/scala/chisel3/StrongEnum.scala
index 8edce4d8..5414ba40 100644
--- a/core/src/main/scala/chisel3/StrongEnum.scala
+++ b/core/src/main/scala/chisel3/StrongEnum.scala
@@ -115,14 +115,12 @@ abstract class EnumType(private val factory: EnumFactory, selfAnnotating: Boolea
final def > (that: EnumType): Bool = macro SourceInfoTransform.thatArg
final def >= (that: EnumType): Bool = macro SourceInfoTransform.thatArg
- // scalastyle:off line.size.limit method.name
def do_=== (that: EnumType)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = compop(sourceInfo, EqualOp, that)
def do_=/= (that: EnumType)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = compop(sourceInfo, NotEqualOp, that)
def do_< (that: EnumType)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = compop(sourceInfo, LessOp, that)
def do_> (that: EnumType)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = compop(sourceInfo, GreaterOp, that)
def do_<= (that: EnumType)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = compop(sourceInfo, LessEqOp, that)
def do_>= (that: EnumType)(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): Bool = compop(sourceInfo, GreaterEqOp, that)
- // scalastyle:on line.size.limit method.name
override def do_asUInt(implicit sourceInfo: SourceInfo, compileOptions: CompileOptions): UInt =
pushOp(DefPrim(sourceInfo, UInt(width), AsUIntOp, ref))
@@ -246,8 +244,8 @@ abstract class EnumFactory {
enum_records.find(_.inst.litValue() == id).map(_.name)
}
- protected def Value: Type = macro EnumMacros.ValImpl // scalastyle:off method.name
- protected def Value(id: UInt): Type = macro EnumMacros.ValCustomImpl // scalastyle:off method.name
+ protected def Value: Type = macro EnumMacros.ValImpl
+ protected def Value(id: UInt): Type = macro EnumMacros.ValCustomImpl
protected def do_Value(name: String): Type = {
val result = new Type
@@ -280,7 +278,6 @@ abstract class EnumFactory {
def apply(): Type = new Type
def apply(n: UInt)(implicit sourceInfo: SourceInfo, connectionCompileOptions: CompileOptions): Type = {
- // scalastyle:off line.size.limit
if (n.litOption.isDefined) {
enumInstances.find(_.litValue == n.litValue) match {
case Some(result) => result
@@ -300,12 +297,11 @@ abstract class EnumFactory {
result
}
}
- // scalastyle:on line.size.limit
}
private[chisel3] object EnumMacros {
- def ValImpl(c: Context) : c.Tree = { // scalastyle:off method.name
+ def ValImpl(c: Context) : c.Tree = {
import c.universe._
// Much thanks to michael_s for this solution:
@@ -320,7 +316,7 @@ private[chisel3] object EnumMacros {
q"""this.do_Value($name)"""
}
- def ValCustomImpl(c: Context)(id: c.Expr[UInt]): c.universe.Tree = { // scalastyle:off method.name
+ def ValCustomImpl(c: Context)(id: c.Expr[UInt]): c.universe.Tree = {
import c.universe._
val term = c.internal.enclosingOwner