style: improve code formatting and consistency in typeChecker and assemblyIR

This commit is contained in:
Guy C
2025-02-25 00:05:10 +00:00
parent 1488281223
commit f30cf42c4b
3 changed files with 147 additions and 138 deletions

View File

@@ -180,7 +180,7 @@ object typeChecker {
microWacc.Builtin.Read,
List(
destTy match {
case KnownType.Int => "%d".toMicroWaccCharArray
case KnownType.Int => "%d".toMicroWaccCharArray
case KnownType.Char | _ => "%c".toMicroWaccCharArray
},
destTyped
@@ -218,9 +218,9 @@ object typeChecker {
val exprTyped = checkValue(expr, Constraint.Unconstrained)
val format = exprTyped.ty match {
case KnownType.Bool | KnownType.String => "%s"
case KnownType.Char => "%c"
case KnownType.Int => "%d"
case _ => "%p"
case KnownType.Char => "%c"
case KnownType.Int => "%d"
case _ => "%p"
}
List(
microWacc.Call(