return result;
}
public Page handlePage(HiddenTokenAwareTree token) {
Page result = new Page(token);
List<HiddenTokenAwareTree> children = token.getChildren();
for (HiddenTokenAwareTree kid : children) {
if (kid.getType() == LessLexer.IDENT) {
result.setName(new Name(kid, kid.getText()));
} else if (kid.getType() == LessLexer.PSEUDO_PAGE) {
int pseudoPageIndex = 1;
if (kid.getChild(0).getType() == LessLexer.MEANINGFULL_WHITESPACE) {
pseudoPageIndex = 2;
result.setDockedPseudopage(false);
}
result.setPseudopage(new Name(kid, ":" + kid.getChild(pseudoPageIndex).getText()));
} else if (kid.getType() == LessLexer.BODY) {
result.setBody(createGeneralBody(kid));
} else {
throw new BugHappened(GRAMMAR_MISMATCH, kid);
}
}
return result;