mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
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(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)
|
||||
ajax_http_get("upload.cgi?cc="+encodeURIComponent(s),check)
|
||||
|
||||
@@ -171,7 +171,7 @@ function gfshell(cmd,cont) {
|
||||
function check_exp(s,cont) {
|
||||
function check(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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user