1
0
forked from GitHub/gf-core

restore the method BracketedString.render which was needed for TranslateApp

This commit is contained in:
krasimir
2010-09-29 13:53:13 +00:00
parent fdcec4273c
commit 35b14d26f3

View File

@@ -141,6 +141,20 @@ public class PGF {
public final native int getFId() /*-{ return this.fid; }-*/;
public final native int getIndex() /*-{ return this.index; }-*/;
public final native BracketedString[] getChildren() /*-{ return this.children; }-*/;
public final String render() {
if (getToken() != null)
return getToken();
else {
StringBuilder sbuilder = new StringBuilder();
for (BracketedString bs : getChildren()) {
if (sbuilder.length() > 0)
sbuilder.append(' ');
sbuilder.append(bs.render());
}
return sbuilder.toString();
}
}
}
public static class TcError extends JavaScriptObject {