gfse: some correctness checks for concrete syntax

The editor now calls the GF server to check the syntax of expressions that
are part of concrete syntax (except for parameter types).
This is currently done by using the cc command of the GF shell, which puts
some unnecessary restricitons on operation definitions...
This commit is contained in:
hallgren
2011-07-29 15:44:19 +00:00
parent 7c6f6110eb
commit b58fc79908
4 changed files with 55 additions and 29 deletions

View File

@@ -136,6 +136,11 @@ function gfshell(cmd,cont) {
// Check the syntax of an expression
function check_exp(s,cont) {
// Not implemented yet!!
cont(null)
function check(gf_message) {
debug("cc "+s+" = "+gf_message);
cont(/parse error/.test(gf_message) ? "parse error" : null);
}
if(navigator.onLine)
ajax_http_get("upload.cgi?cc="+encodeURIComponent(s),check)
else cont(null)
}