mirror of
https://github.com/Ratstail91/sineQL.git
synced 2025-11-29 02:34:28 +11:00
Bugfix
This commit is contained in:
1421
package-lock.json
generated
1421
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -7,11 +7,16 @@
|
|||||||
"doc": "docs"
|
"doc": "docs"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"start": "pm2 start server/server.js",
|
||||||
|
"restart": "pm2 restart server/server.js",
|
||||||
|
"stop": "pm2 stop server/server.js",
|
||||||
|
"list": "pm2 list",
|
||||||
"node": "node server/server.js"
|
"node": "node server/server.js"
|
||||||
},
|
},
|
||||||
"author": "Kayne Ruse",
|
"author": "Kayne Ruse",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"express": "^4.17.1"
|
"express": "^4.17.1",
|
||||||
|
"pm2": "^4.4.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ const parseQuery = async (handler, tokens, pos, typeGraph, parent = null) => {
|
|||||||
|
|
||||||
//eat the end bracket
|
//eat the end bracket
|
||||||
if (tokens[pos - 1] !== '}') {
|
if (tokens[pos - 1] !== '}') {
|
||||||
throw 'Expected \'}\' at the end of query (found ' + tokens[pos] + ')';
|
throw 'Expected \'}\' at the end of query (found ' + tokens[pos - 1] + ')';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!handler[queryType]) {
|
if (!handler[queryType]) {
|
||||||
@@ -311,10 +311,11 @@ const lexify = (body, allowStrings) => {
|
|||||||
|
|
||||||
//anything else is a multi-character token
|
//anything else is a multi-character token
|
||||||
const start = current;
|
const start = current;
|
||||||
while(body[current - 1] && !/[{}"\s]/.test(body[current - 1])) {
|
while(body[current] && !/[{}"\s]/.test(body[current])) {
|
||||||
|
console.log('advancing past', body[current]);
|
||||||
current++;
|
current++;
|
||||||
}
|
}
|
||||||
tokens.push(body.substring(start - 1, current - 1));
|
tokens.push(body.substring(start - 1, current));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user