latex-lsp/index.ts

17 lines
375 B
TypeScript
Raw Normal View History

2023-12-25 22:44:16 +00:00
import fs from 'fs';
import process from 'process';
import { getDiagnostics, parseLsp } from './parser';
if (process.argv.length !== 3) {
console.log("Please provide only one pass");
process.exit(1);
}
const file = fs.readFileSync(process.argv[2]).toString();
const res = parseLsp(file);
fs.writeFileSync('./res', res.text);
console.log(await getDiagnostics(file));