void LessAtRule::process(Stylesheet &s) { AtRule* target = s.createAtRule(getKeyword()); target->setRule(getRule()); getLessStylesheet()->getContext()->processValue(target->getRule()); }
// At rules TEST(CssParserTest, AtRule) { istringstream in("@import somefile;"); CssTokenizer t(&in); CssParser p(&t); Stylesheet s; AtRule* at; p.parseStylesheet(&s); ASSERT_EQ(1, s.getAtRules()->size()); at = s.getAtRules()->at(0); ASSERT_STREQ("@import", at->getKeyword()->c_str()); ASSERT_STREQ("somefile", at->getRule()->toString()->c_str()); }