style: reformat

This commit is contained in:
Kagura 2024-11-01 10:05:16 +08:00
parent 0e461e1419
commit 008af1f7e3
7 changed files with 47 additions and 46 deletions

View file

@ -32,7 +32,6 @@ import utils.*
@Composable
@Preview
fun App() {
var source: SourceFile? = null
val showResult = remember { mutableStateOf(false) }
var defineList by remember { mutableStateOf("") }
var useList by remember { mutableStateOf("") }
@ -51,8 +50,10 @@ fun App() {
}) {
AlertDialog(
title = {
Column(modifier = Modifier.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally) {
Column(
modifier = Modifier.fillMaxWidth(),
horizontalAlignment = Alignment.CenterHorizontally
) {
Text(
text = when (page) {
0 -> "函数定义的变量"
@ -69,8 +70,10 @@ fun App() {
}
},
text = {
Box(modifier = Modifier.fillMaxWidth()
.fillMaxHeight(0.8f)) {
Box(
modifier = Modifier.fillMaxWidth()
.fillMaxHeight(0.8f)
) {
Text(
text = when (page) {
0 -> defineList
@ -151,7 +154,6 @@ fun App() {
return@TextfieldWithLineNumber
}
val sf = SourceFile(it)
source = sf
try {
sf.parseFunction()
} catch (e: Exception) {
@ -197,8 +199,7 @@ fun App() {
traceTree = traceTreeStr.toString()
funcTraceTree =
getInvokeTraceTreeString(sf)
funcTraceTree = getInvokeTraceTreeString(sf)
ttGraph = generateGraph(relations)
ivGraph = sf.functions.getInvokeGraph()

View file

@ -95,8 +95,7 @@ class CParser(content: String, paramNameList: List<String>) {
}
}
}
}
else {
} else {
if (right in defineList) { // 看看有没有使用值
result.add(
Sentence(

View file

@ -28,6 +28,7 @@ fun openBrowser(uri: URI) {
}
}
}
else -> desktop.browse(uri)
}
}