2024-04-07 19:10:38 +08:00
|
|
|
<!doctype html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8" />
|
|
|
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<title>Vite + TS</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="app"></div>
|
|
|
|
<script type="module" src="%VITE_ENTRY_PATH%"></script>
|
|
|
|
<script type="module">
|
|
|
|
const { DtSqlParserSemAnalysePlugin } = await import(/* @vite-ignore */import.meta.env.VITE_ENTRY_PATH)
|
|
|
|
const myPlugin = new DtSqlParserSemAnalysePlugin()
|
2024-05-28 11:32:20 +08:00
|
|
|
const sql = 'INSERT INTO |'
|
2024-04-07 19:10:38 +08:00
|
|
|
const caretColumn = sql.indexOf('|') + 1
|
|
|
|
const result = myPlugin.parse(sql.replace('|', ''), { lineNumber: 1, columnNumber: caretColumn })
|
|
|
|
console.log(result)
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|