forked from GitHub/gf-core
gfse: bug fix: syntax check in concrete syntax wasn't working
In newer versions of GF the shell says "syntax error" instead of "parse error".
This commit is contained in:
@@ -140,7 +140,7 @@ function gfshell(cmd,cont) {
|
|||||||
function check_exp(s,cont) {
|
function check_exp(s,cont) {
|
||||||
function check(gf_message) {
|
function check(gf_message) {
|
||||||
//debug("cc "+s+" = "+gf_message);
|
//debug("cc "+s+" = "+gf_message);
|
||||||
cont(/parse error/.test(gf_message) ? "parse error" : null);
|
cont(/(parse|syntax) error/.test(gf_message) ? "syntax error" : null);
|
||||||
}
|
}
|
||||||
if(navigator.onLine)
|
if(navigator.onLine)
|
||||||
ajax_http_get("upload.cgi?cc="+encodeURIComponent(s),check)
|
ajax_http_get("upload.cgi?cc="+encodeURIComponent(s),check)
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ function gfshell(cmd,cont) {
|
|||||||
function check_exp(s,cont) {
|
function check_exp(s,cont) {
|
||||||
function check(gf_message) {
|
function check(gf_message) {
|
||||||
//debug("cc "+s+" = "+gf_message);
|
//debug("cc "+s+" = "+gf_message);
|
||||||
cont(/parse error/.test(gf_message) ? "parse error" : null);
|
cont(/(parse|syntax) error/.test(gf_message) ? "syntax error" : null);
|
||||||
}
|
}
|
||||||
gfshell("cc "+s,check);
|
gfshell("cc "+s,check);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user