[mod] ver:0.0.28
This commit is contained in:
parent
560628c7de
commit
9dd58b2b70
21 changed files with 1129 additions and 1253 deletions
13
scripts/test.js
Normal file
13
scripts/test.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
|
||||
const XQLint =require("@quodatum/xqlint").XQLint;
|
||||
const CodeFormatter=require( "@quodatum/xqlint").CodeFormatter;
|
||||
console.log("....");
|
||||
const xquery="2 +4 ";
|
||||
const linter = new XQLint(xquery, { "styleCheck": false }) ;
|
||||
|
||||
//if(linter.hasSyntaxError()+linter.hasSyntaxError()) throw new Error("XQuery syntax error")
|
||||
const ast=linter.getAST()
|
||||
const formatter = new CodeFormatter(ast);
|
||||
const formatted = formatter.format().trim();
|
||||
console.log(formatted);
|
||||
Loading…
Add table
Add a link
Reference in a new issue