diff options
| author | hallgren <hallgren@chalmers.se> | 2012-03-05 20:47:52 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2012-03-05 20:47:52 +0000 |
| commit | 6ee74e5df5d5e21d13b130da93d3ba7b3f430cd9 (patch) | |
| tree | 5d192c66c3322ecac489116263aa93ae70204fb7 /src | |
| parent | a55588aad50536f36de1aa1b82cafdcfad3a092f (diff) | |
gfse: bug fix: avoid hickup when inhertiting from a missing concrete syntax
Diffstat (limited to 'src')
| -rw-r--r-- | src/www/gfse/editor.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/www/gfse/editor.js b/src/www/gfse/editor.js index b0a5636d5..4595a2c37 100644 --- a/src/www/gfse/editor.js +++ b/src/www/gfse/editor.js @@ -1130,12 +1130,13 @@ function inherited_grammars(g) { // Load the available grammars once var grammar_byname=cached_grammar_byname(); var visited={}; + function exists(g) { return g; } // Then traverse the dependencies to collect all inherited grammars function ihgs(g) { if(visited[g.basename]) return []; // avoid cycles and diamonds else { visited[g.basename]=true; - var igs=(g.extends || []).map(grammar_byname) + var igs=(g.extends || []).map(grammar_byname).filter(exists); var igss=igs.map(ihgs) for(var i in igss) igs=igs.concat(igss[i]); return igs; |
