Package com.github.sommeri.less4j.core.ast

Examples of com.github.sommeri.less4j.core.ast.Name


  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);
      }
View Full Code Here


  public PageMarginBox handlePageMarginBox(HiddenTokenAwareTree token) {
    PageMarginBox result = new PageMarginBox(token);
    List<HiddenTokenAwareTree> children = token.getChildren();
    for (HiddenTokenAwareTree kid : children) {
      if (kid.getType() == LessLexer.AT_NAME) {
        result.setName(new Name(kid, kid.getText()));
      } else if (kid.getType() == LessLexer.BODY) {
        result.setBody(createGeneralBody(kid));
      } else {
        throw new BugHappened(GRAMMAR_MISMATCH, kid);
      }
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.core.ast.Name

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.