Slight API change, finalization of (desktop) UI (gotta do mobile web view still)
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package com.jaytux.simd.data
|
||||
|
||||
import com.fleeksoft.ksoup.Ksoup
|
||||
import com.fleeksoft.ksoup.parser.Parser
|
||||
import com.jaytux.simd.data.IntrinsicInstructions.xed
|
||||
import kotlinx.coroutines.coroutineScope
|
||||
import kotlinx.datetime.*
|
||||
@ -84,6 +85,7 @@ object Loader {
|
||||
|
||||
suspend fun loadXml(xmlFile: String): XmlData = coroutineScope {
|
||||
val xml = Ksoup.parseXml(File(xmlFile).readText(Charsets.UTF_8))
|
||||
Parser.xmlParser()
|
||||
|
||||
val cppTypes = mutableSetOf<String>()
|
||||
val techs = mutableSetOf<String>()
|
||||
@ -158,13 +160,13 @@ object Loader {
|
||||
args += argName to type
|
||||
}
|
||||
|
||||
val desc = it.getElementsByTag("description").firstOrNull()?.text()
|
||||
val desc = it.getElementsByTag("description").firstOrNull()?.wholeText()?.trim()
|
||||
if(desc == null) {
|
||||
errors += "Missing description element for intrinsic $name"
|
||||
return@forEachIndexed
|
||||
}
|
||||
|
||||
val op = it.getElementsByTag("operation").firstOrNull()?.text()
|
||||
val op = it.getElementsByTag("operation").firstOrNull()?.wholeText()?.trim()
|
||||
|
||||
val insn = mutableListOf<Triple<String, String, String?>>()
|
||||
it.getElementsByTag("instruction").forEachIndexed { i, ins ->
|
||||
|
Reference in New Issue
Block a user