Skip to content

Commit

Permalink
Reformatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
thetabotmaintainer[bot] committed Nov 12, 2023
1 parent 80cb623 commit 7b0d21c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ class FrontendMetadataAdapter(val gsonSupplier: () -> Gson) : TypeAdapter<Fronte
writer.name("values").beginArray()
for ((key, _val) in tup.entries) {
writer.beginObject()
if(_val is String) {
if (_val is String) {
writer.name(key).value(_val)
}
if(_val is Boolean) {
if (_val is Boolean) {
writer.name(key).value(_val)
}
writer.endObject()
Expand Down Expand Up @@ -68,9 +68,11 @@ class FrontendMetadataAdapter(val gsonSupplier: () -> Gson) : TypeAdapter<Fronte
"owner" -> {
owner = reader.nextInt()
}

"values" -> {
values = readValuesArray(reader)
}

else -> {
reader.skipValue()
}
Expand Down Expand Up @@ -103,9 +105,11 @@ class FrontendMetadataAdapter(val gsonSupplier: () -> Gson) : TypeAdapter<Fronte
"key" -> {
key = reader.nextString()
}

"value" -> {
value = readValue(reader)
}

else -> {
reader.skipValue()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,24 +63,30 @@ class ParseContextAdapter(val gsonSupplier: () -> Gson) : TypeAdapter<ParseConte
"metadata" -> {
metadata = gson.fromJson(reader, FrontendMetadata::class.java)
}

"cStmtCounter" -> {
cStmtCounter = gson.fromJson(reader, CStmtCounter::class.java)
}

"bitwiseOption" -> {
val optionName = reader.nextString()
bitwiseOption = BitwiseOption.valueOf(optionName)
}

"architecture" -> {
val architectureName = reader.nextString()
architecture = ArchitectureConfig.ArchitectureType.valueOf(architectureName)
}

"multiThreading" -> {
multiThreading = reader.nextBoolean()
}

"arithmetic" -> {
val arithmeticName = reader.nextString()
arithmetic = ArchitectureConfig.ArithmeticType.valueOf(arithmeticName)
}

else -> {
reader.skipValue()
}
Expand Down

0 comments on commit 7b0d21c

Please sign in to comment.