Examples of parseSelector()


Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

public class SelectorsGrammarTest {

  @Test
  public void emptyCombinator() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("h1 h2 {", null);
    assertValidSelector(result);
  }

  @Test
  public void spacelessCombinator() {
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

  }

  @Test
  public void spacelessCombinator() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("h1>h2 {", null);
    assertValidSelector(result);
  }

  @Test
  public void spacedCombinator() {
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

  }

  @Test
  public void spacedCombinator() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("h1 + h2 {", null);
    assertValidSelector(result);
  }

  @Test
  public void afterCSS2() {
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

  }

  @Test
  public void afterCSS2() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("li:after {", null);
    assertValidSelector(result);
    assertChilds(result.getTree(), LessLexer.EMPTY_COMBINATOR, LessLexer.SIMPLE_SELECTOR);
  }

  @Test
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

  @Test
  public void afterCSS3() {
    ANTLRParser compiler = new ANTLRParser();
    String selector = "li::after {";
    ANTLRParser.ParseResult result = compiler.parseSelector(selector, null);
    assertValidSelector(result);
    assertChilds(result.getTree(), LessLexer.EMPTY_COMBINATOR, LessLexer.SIMPLE_SELECTOR);
  }

  @Test
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

  @Test
  public void notPseudo() {
    ANTLRParser compiler = new ANTLRParser();
    String selector = "li:not(:only-child) { ";
    ANTLRParser.ParseResult result = compiler.parseSelector(selector, null);
    assertValidSelector(result);
    }

  @Test
  public void notNumber() {
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

    }

  @Test
  public void notNumber() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("class#id[attr=32]:not(1) {", null);
    assertValidSelector(result);
  }

  @Test
  public void notAttribute() {
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

  }

  @Test
  public void notAttribute() {
    ANTLRParser compiler = new ANTLRParser();
    ANTLRParser.ParseResult result = compiler.parseSelector("p:not([class*=\"lead\"]) {", null);
    assertValidSelector(result);
  }
 
  @Test
  public void stylesheetWithMultipleFormulas() {
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

  }

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

  @Test
  public void formulaAnMinusb() {
View Full Code Here

Examples of com.github.sommeri.less4j.core.parser.ANTLRParser.parseSelector()

  }

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

  @Test
  public void formulaAn() {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.