Package com.google.caja.lexer

Examples of com.google.caja.lexer.TokenConsumer.mark()


      List<? extends CssTree> children = children();
      if (!children.isEmpty()) {
        out.consume(" ");
        renderSpaceGroup(children, r);
      }
      out.mark(FilePosition.endOfOrNull(getFilePosition()));
      out.consume("]");
    }
  }

  /** Operator used in {@link Attrib} */
 
View Full Code Here


  public String getLabel() { return label; }

  public void render(RenderContext rc) {
    TokenConsumer out = rc.getOut();
    out.mark(getFilePosition());
    out.consume("break");
    if (null != label && !"".equals(label)) {
      out.consume(label);
    }
  }
View Full Code Here

  private static void renderStatements(
      List<? extends CssTree> children, @Nullable FilePosition pos,
      RenderContext r) {
    TokenConsumer out = r.getOut();
    out.mark(pos);
    out.consume("{");
    CssTree last = null;
    for (CssTree decl : children) {
      if (last != null) {
        out.consume(";");
View Full Code Here

    for (String line
         : TestUtil.readResource(getClass(), rewrittenFile).split("\n")) {
      if (line.startsWith("#")) {
        line = line.substring(1).trim();
        if ("<null>".equals(line)) {
          r.mark(null);
        } else {
          r.mark(toFilePosition(line, originalSrcs));
        }
      } else {
        r.consume(line);
View Full Code Here

      if (line.startsWith("#")) {
        line = line.substring(1).trim();
        if ("<null>".equals(line)) {
          r.mark(null);
        } else {
          r.mark(toFilePosition(line, originalSrcs));
        }
      } else {
        r.consume(line);
      }
    }
View Full Code Here

  @Override
  public Boolean conditionResult() { return true; }

  public void render(RenderContext rc) {
    TokenConsumer out = rc.getOut();
    out.mark(getFilePosition());
    out.consume("{");
    boolean seen = false;
    for (ObjProperty prop : children()) {
      if (seen) {
        out.consume(",");
View Full Code Here

      } else {
        seen = true;
      }
      prop.render(rc);
    }
    out.mark(FilePosition.endOfOrNull(getFilePosition()));
    out.consume("}");
  }

  public String typeOf() { return "object"; }
View Full Code Here

  public String getLabel() { return label; }

  public void render(RenderContext rc) {
    TokenConsumer out = rc.getOut();
    out.mark(getFilePosition());
    out.consume("continue");
    if (null != label && !"".equals(label)) {
      out.consume(label);
    }
  }
View Full Code Here

    this.body = (Statement) children.get(2);
  }

  public void render(RenderContext rc) {
    TokenConsumer out = rc.getOut();
    out.mark(getFilePosition());
    String label = getRenderedLabel(rc);
    if (null != label) {
      out.consume(label);
      out.consume(":");
    }
View Full Code Here

  @Override
  public Statement getBody() { return body; }

  public void render(RenderContext rc) {
    TokenConsumer out = rc.getOut();
    out.mark(getFilePosition());
    String label = getRenderedLabel(rc);
    if (null != label) {
      out.consume(label);
      out.consume(":");
    }
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.