/** * Creates a single property declaration. * @param property Property name. * @param term Property value. * @return The resulting declaration. */ protected Declaration createDeclaration(String property, Term<?> term) { Declaration d = CSSFactory.getRuleFactory().createDeclaration(); d.unlock(); d.setProperty(property); d.add(term); return d; }
((declaration_scope)declaration_stack.peek()).d.setProperty(extractText(i)); ((declaration_scope)declaration_stack.peek()).d.setProperty("-" + extractText(i));
@Override /** * Setting property of declaration property : MINUS? IDENT S* returns null - processed via declaration_sctack */ public Object visitProperty(CSSParser.PropertyContext ctx) { logEnter("property"); String property = extractTextUnescaped(ctx.IDENT().getText()); if (ctx.MINUS() != null) { property = ctx.MINUS().getText() + property; } declaration_stack.peek().d.setProperty(property); Token token = ctx.IDENT().getSymbol(); declaration_stack.peek().d.setSource(extractSource((CSSToken) token)); log.debug("Setting property: {}", declaration_stack.peek().d.getProperty()); logLeave("property"); //returns null return null; }
@Override /** * Setting property of declaration property : MINUS? IDENT S* returns null - processed via declaration_sctack */ public Object visitProperty(CSSParser.PropertyContext ctx) { logEnter("property"); String property = extractTextUnescaped(ctx.IDENT().getText()); if (ctx.MINUS() != null) { property = ctx.MINUS().getText() + property; } declaration_stack.peek().d.setProperty(property); Token token = ctx.IDENT().getSymbol(); declaration_stack.peek().d.setSource(extractSource((CSSToken) token)); log.debug("Setting property: {}", declaration_stack.peek().d.getProperty()); logLeave("property"); //returns null return null; }
declaration_stack.peek().d.setProperty(extractText(i)); declaration_stack.peek().d.setSource(extractSource(i)); declaration_stack.peek().d.setProperty("-" + extractText(i)); declaration_stack.peek().d.setSource(extractSource(i));
decl.setProperty(property); Token token = ctx.IDENT().getSymbol(); decl.setSource(extractSource((CSSToken) token));
decl.setProperty(property); Token token = ctx.IDENT().getSymbol(); decl.setSource(extractSource((CSSToken) token));
return false; d.setProperty("grid-template-areas"); if (genericOneIdent(GridTemplateAreas.class, d, properties)) { return true; rowsDecl.setProperty("grid-template-rows"); Declaration columnsDecl = (Declaration) rf.createDeclaration().unlock(); columnsDecl.setProperty("grid-template-columns"); boolean beforeSlash = true; for (int i = 0; i < d.size(); i++) {
templateDecl.setProperty("grid-template"); if (processGridTemplate(templateDecl, properties, values)) { return true; boolean autoFlowBeforeSlash = false; Declaration autoFlowDecl = (Declaration) rf.createDeclaration().unlock(); autoFlowDecl.setProperty("grid-auto-flow"); Declaration templateRowsDecl = (Declaration) rf.createDeclaration().unlock(); templateRowsDecl.setProperty("grid-template-rows"); Declaration autoRowsDecl = (Declaration) rf.createDeclaration().unlock(); autoRowsDecl.setProperty("grid-auto-rows"); Declaration templateColumnsDecl = (Declaration) rf.createDeclaration().unlock(); templateColumnsDecl.setProperty("grid-template-columns"); Declaration autoColumnsDecl = (Declaration) rf.createDeclaration().unlock(); autoColumnsDecl.setProperty("grid-auto-columns");