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
|
@Composable
|
||||||
@Preview
|
@Preview
|
||||||
fun App() {
|
fun App() {
|
||||||
var source: SourceFile? = null
|
|
||||||
val showResult = remember { mutableStateOf(false) }
|
val showResult = remember { mutableStateOf(false) }
|
||||||
var defineList by remember { mutableStateOf("") }
|
var defineList by remember { mutableStateOf("") }
|
||||||
var useList by remember { mutableStateOf("") }
|
var useList by remember { mutableStateOf("") }
|
||||||
|
@ -51,8 +50,10 @@ fun App() {
|
||||||
}) {
|
}) {
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
title = {
|
title = {
|
||||||
Column(modifier = Modifier.fillMaxWidth(),
|
Column(
|
||||||
horizontalAlignment = Alignment.CenterHorizontally) {
|
modifier = Modifier.fillMaxWidth(),
|
||||||
|
horizontalAlignment = Alignment.CenterHorizontally
|
||||||
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = when (page) {
|
text = when (page) {
|
||||||
0 -> "函数定义的变量"
|
0 -> "函数定义的变量"
|
||||||
|
@ -69,8 +70,10 @@ fun App() {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
text = {
|
text = {
|
||||||
Box(modifier = Modifier.fillMaxWidth()
|
Box(
|
||||||
.fillMaxHeight(0.8f)) {
|
modifier = Modifier.fillMaxWidth()
|
||||||
|
.fillMaxHeight(0.8f)
|
||||||
|
) {
|
||||||
Text(
|
Text(
|
||||||
text = when (page) {
|
text = when (page) {
|
||||||
0 -> defineList
|
0 -> defineList
|
||||||
|
@ -151,7 +154,6 @@ fun App() {
|
||||||
return@TextfieldWithLineNumber
|
return@TextfieldWithLineNumber
|
||||||
}
|
}
|
||||||
val sf = SourceFile(it)
|
val sf = SourceFile(it)
|
||||||
source = sf
|
|
||||||
try {
|
try {
|
||||||
sf.parseFunction()
|
sf.parseFunction()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -197,8 +199,7 @@ fun App() {
|
||||||
|
|
||||||
traceTree = traceTreeStr.toString()
|
traceTree = traceTreeStr.toString()
|
||||||
|
|
||||||
funcTraceTree =
|
funcTraceTree = getInvokeTraceTreeString(sf)
|
||||||
getInvokeTraceTreeString(sf)
|
|
||||||
|
|
||||||
ttGraph = generateGraph(relations)
|
ttGraph = generateGraph(relations)
|
||||||
ivGraph = sf.functions.getInvokeGraph()
|
ivGraph = sf.functions.getInvokeGraph()
|
||||||
|
|
|
@ -95,8 +95,7 @@ class CParser(content: String, paramNameList: List<String>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (right in defineList) { // 看看有没有使用值
|
if (right in defineList) { // 看看有没有使用值
|
||||||
result.add(
|
result.add(
|
||||||
Sentence(
|
Sentence(
|
||||||
|
|
|
@ -28,6 +28,7 @@ fun openBrowser(uri: URI) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> desktop.browse(uri)
|
else -> desktop.browse(uri)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue