style: reformat
This commit is contained in:
parent
0e461e1419
commit
008af1f7e3
7 changed files with 47 additions and 46 deletions
|
@ -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()
|
||||
|
|
|
@ -95,8 +95,7 @@ class CParser(content: String, paramNameList: List<String>) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
if (right in defineList) { // 看看有没有使用值
|
||||
result.add(
|
||||
Sentence(
|
||||
|
|
|
@ -28,6 +28,7 @@ fun openBrowser(uri: URI) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
else -> desktop.browse(uri)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue