mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-21 02:39:31 -06:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user