add peg source file
This commit is contained in:
parent
b2c7777fb6
commit
6eb8a18c48
@ -1,4 +1,4 @@
|
|||||||
### dt-sql-parser
|
# dt-sql-parser
|
||||||
|
|
||||||
本项目用于处理sql,目前含有功能
|
本项目用于处理sql,目前含有功能
|
||||||
|
|
||||||
|
17
package-lock.json
generated
17
package-lock.json
generated
@ -1,5 +1,20 @@
|
|||||||
{
|
{
|
||||||
"name": "dt-sql-parser",
|
"name": "dt-sql-parser",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 1
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"node-query": {
|
||||||
|
"version": "0.3.3",
|
||||||
|
"resolved": "http://registry.npm.taobao.org/node-query/download/node-query-0.3.3.tgz",
|
||||||
|
"integrity": "sha1-s+PXV/7y4oAdUs09R5ikVfAa5Ks=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"pegjs": {
|
||||||
|
"version": "0.7.0",
|
||||||
|
"resolved": "http://registry.npm.taobao.org/pegjs/download/pegjs-0.7.0.tgz",
|
||||||
|
"integrity": "sha1-qqH4JPnnGX7ETiKlevUi9wDdaJ4=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
10
package.json
10
package.json
@ -3,8 +3,14 @@
|
|||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "sql parser",
|
"description": "sql parser",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {},
|
"scripts": {
|
||||||
|
"build": "pegjs peg/nquery.pegjs core/astParser.js"
|
||||||
|
},
|
||||||
"author": "xiaokang",
|
"author": "xiaokang",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"devDependencies": {}
|
"devDependencies": {
|
||||||
|
"node-query": "^0.3.3",
|
||||||
|
"pegjs": "^0.7.0"
|
||||||
|
},
|
||||||
|
"dependencies": {}
|
||||||
}
|
}
|
||||||
|
1043
peg/nquery.pegjs
Normal file
1043
peg/nquery.pegjs
Normal file
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,8 @@ for(let [key,value] of testMap){
|
|||||||
console.log(`******${key}********`)
|
console.log(`******${key}********`)
|
||||||
console.log(value)
|
console.log(value)
|
||||||
console.log(`******result********`)
|
console.log(`******result********`)
|
||||||
// console.log(dtSqlParser.parser.parse(value));
|
console.log(dtSqlParser.parser.parse(value));
|
||||||
console.log(dtSqlParser.filter.filterComments(value))
|
// console.log(dtSqlParser.filter.filterComments(value))
|
||||||
console.log(`********************`)
|
console.log(`********************`)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user