Package com.github.sommeri.less4j.core.parser

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser


    assertValid(result);
  }

  @Test
  public void formulaAnb() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:nth-child(4n+1) {", null);
    assertValidSelector(result);
  }
View Full Code Here


    assertValidSelector(result);
  }

  @Test
  public void formulaAnMinusb() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:nth-child(4n-1) {", null);
    assertValidSelector(result);
  }
View Full Code Here

    assertValidSelector(result);
  }

  @Test
  public void formulaAn() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:nth-child(4n) {", null);
    assertValidSelector(result);
  }
View Full Code Here

    assertValidSelector(result);
  }

  @Test
  public void formulaMinusAn() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:nth-child(-4n) {", null);
    assertValidSelector(result);
  }
View Full Code Here

    assertValidSelector(result);
  }

  @Test
  public void formulaMinusN() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:nth-child(-n) {", null);
    assertValidSelector(result);
  }
View Full Code Here

    assertValidSelector(result);
  }

  @Test
  public void formulaMinusNMinus() {
    ANTLRParser compiler = new ANTLRParser();
    String selector = "li:nth-child(-n+2) {";
    ANTLRParser.ParseResult result = compiler.parseSelector(selector, null);
    assertValidSelector(result);
  }
View Full Code Here

    assertValidSelector(result);
  }

  @Test
  public void formulaEven() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:nth-child(even) {", null);
    assertValidSelector(result);
  }
View Full Code Here

    assertValidSelector(result);
  }

  @Test
  public void formulaEvenUppercase() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:NTH-CHILD(EVEN) {", null);
    assertValidSelector(result);
  }
View Full Code Here

    assertValidSelector(result);
  }

  @Test
  public void formulaOdd() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:nth-child(odd) {", null);
    assertValidSelector(result);
  }
View Full Code Here

    assertValidSelector(result);
  }

  @Test
  public void formulaOddUppercase() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:NTH-CHILD(ODD) {", null);
    assertValidSelector(result);
  }
View Full Code Here

TOP

Related Classes of com.github.sommeri.less4j.core.parser.ANTLRParser

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.