Search in sources :

Example 1 with Site

use of us.parr.bookish.model.Site in project bookish by parrt.

the class Translator method visitSite.

@Override
public OutputModelObject visitSite(BookishParser.SiteContext ctx) {
    String label = null;
    EntityDef def = null;
    if (ctx.REF() != null) {
        label = stripQuotes(ctx.REF().getText());
        def = document.getEntity(label);
        if (def == null) {
            System.err.printf("line %d: Unknown label '%s'\n", ctx.start.getLine(), label);
            return null;
        }
    }
    def.model = new Site((SiteDef) def);
    return null;
}
Also used : Site(us.parr.bookish.model.Site) SiteDef(us.parr.bookish.model.entity.SiteDef) EntityDef(us.parr.bookish.model.entity.EntityDef)

Aggregations

Site (us.parr.bookish.model.Site)1 EntityDef (us.parr.bookish.model.entity.EntityDef)1 SiteDef (us.parr.bookish.model.entity.SiteDef)1