1
0
forked from GitHub/gf-core

minibar.js: show the type error messages that can occur for grammars with dependent types

This commit is contained in:
hallgren
2010-10-18 12:15:30 +00:00
parent ca0214d6a1
commit d803d2a925

View File

@@ -356,9 +356,11 @@ function show_translations(translationResults) {
//trans.translations=translations;
trans.single_translation=[];
trans.innerHTML="";
/*
trans.appendChild(wrap("h3",text(cnt<1 ? "No translations?" :
cnt>1 ? ""+cnt+" translations:":
"One translation:")));
*/
for(p=0;p<cnt;p++) {
var tra=translationResults[p];
if (tra.translations != null) {
@@ -377,6 +379,11 @@ function show_translations(translationResults) {
trans.appendChild(wrap("table",tbody));
}
}
else if(tra.typeErrors) {
var errs=tra.typeErrors;
for(var i=0;i<errs.length;i++)
trans.appendChild(wrap("pre",text(errs[i].msg)))
}
}
}