public void toHTML(HTML h) { body.toHTML(h); }
}
- public @bind.as("H") static class Header extends Dump {
+ public @bind static class Header extends Dump {
public @bind.arg KeyVal[] attrs;
// FIXME: it would be nice to be able to
// void KeyVal(String, String) { ... } imperatively
}
- public @bind.as("B") static class Body extends Dump implements ToHTML {
+ public @bind static class Body extends Dump implements ToHTML {
public Section[] sections;
public void toHTML(HTML h) { for(Section s : sections) s.toHTML(h); }
}
public @bind.arg String password;
}
- public @bind.as("Euro") Object euro() { return null; }
- public @bind.as("Citation") Object cite(Object o) { return new Chars("*cite*"); }
- public @bind.as("Symbol") Object sym(Object o) { return null; }
+ public static @bind.as("Euro") Object euro() { return null; }
+ public static @bind.as("Citation") Object cite(Object o) { return new Chars("*cite*"); }
+ public static @bind.as("Symbol") Object sym(Object o) { return null; }
public static abstract class List extends Text {
- public @bind.arg Text[] points;
+ public @bind.arg Text[][] points;
public abstract String tag();
public void toHTML(ToHTML.HTML sb) {
sb.append("<"+tag()+">\n");
- for(Text t : points) sb.tag("li", t);
+ for(Text[] t : points)
+ sb.tag("li", t);
sb.append("</"+tag()+">\n");
}
}
public static class Blockquote extends Paragraph {
Text[] text;
public @bind Blockquote(Text[] t) { this.text = t; }
+ public @bind Blockquote(Text[] t, Text[] t2) {
+ if (t2==null) {
+ this.text = t;
+ } else {
+ Text[] t3 = new Text[t.length + t2.length];
+ System.arraycopy(t, 0, t3, 0, t.length);
+ System.arraycopy(t2, 0, t3, t.length, t2.length);
+ this.text = t3;
+ }
+ }
public void toHTML(HTML h) { h.tag("blockquote", new P(text)); }
}