try { const vscode = require("vscode") const fs = require("fs") const axios = require("axios") let start = vscode.window.activeTextEditor.selection.start.line let fileName = vscode.window.activeTextEditor.document.fileName console.log(start) console.log(fileName) fs.readFile(fileName, 'utf8', (err, data) => { if (err) throw err; var context_arr = data.split("\n") let a = context_arr[start].trim(" ") console.log(a) for (; a.indexOf(" ") > 0;) { a = a.replace(" ", " ") } let b = a.split(" ") if (b[0] != "type" || b[2] != "struct" || b[3] != "{") { vscode.window.showErrorMessage("找不到结构") return } let struct = b[1] axios.get("") console.log(struct) }) } catch (error) { console.log(error) }