summaryrefslogtreecommitdiff
path: root/src/www/gfse/editor.js
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2012-02-27 17:18:05 +0000
committerhallgren <hallgren@chalmers.se>2012-02-27 17:18:05 +0000
commit4441c957eafa2d107b11988a809f5c54ae97b9da (patch)
tree79fc446b6efbe234eb8412aec681966ec9bc1bdf /src/www/gfse/editor.js
parentc41974422f3dc460fcf8008a906adf49ba609019 (diff)
gfse: recognize Predef categories Int, Float and String
but don't show them in the startcat menu.
Diffstat (limited to 'src/www/gfse/editor.js')
-rw-r--r--src/www/gfse/editor.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/www/gfse/editor.js b/src/www/gfse/editor.js
index 72999ce72..18782b91f 100644
--- a/src/www/gfse/editor.js
+++ b/src/www/gfse/editor.js
@@ -366,7 +366,7 @@ function draw_startcat(g) {
function opt(cat) { return option(cat,cat); }
var opts = g.extends && g.extends.length>0 ? [opt("-")] : [];
var dc=defined_cats(g);
- for(var cat in dc) opts.push(opt(cat));
+ for(var cat in dc) if(dc[cat]!="Predef") opts.push(opt(cat));
var m = node("select",{},opts);
m.value=startcat;
m.onchange=function() {
@@ -1096,7 +1096,9 @@ function draw_lins(g,ci) {
function defined_cats(g) { return all_defined_cats(g,inherited_grammars(g)) }
function defined_funs(g) { return all_defined_funs(g,inherited_gramamrs(g)) }
-function inherited_cats(g) {return all_inherited_cats(inherited_grammars(g),{})}
+function inherited_cats(g) {
+ return all_inherited_cats(inherited_grammars(g),predefined_cats())
+}
function inherited_funs(g) {return all_inherited_funs(inherited_grammars(g),{})}
function upload(g,cont) {