mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
restore the method BracketedString.render which was needed for TranslateApp
This commit is contained in:
@@ -141,6 +141,20 @@ public class PGF {
|
|||||||
public final native int getFId() /*-{ return this.fid; }-*/;
|
public final native int getFId() /*-{ return this.fid; }-*/;
|
||||||
public final native int getIndex() /*-{ return this.index; }-*/;
|
public final native int getIndex() /*-{ return this.index; }-*/;
|
||||||
public final native BracketedString[] getChildren() /*-{ return this.children; }-*/;
|
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 {
|
public static class TcError extends JavaScriptObject {
|
||||||
|
|||||||
Reference in New Issue
Block a user