Package com.google.caja.lexer

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


  @Override
  public void render(RenderContext rc) {
    FunctionConstructor fc = getInitializer();
    TokenConsumer out = rc.getOut();
    out.mark(getFilePosition());
    out.consume("function");
    getIdentifier().render(rc);
    out.consume("(");
    boolean seen = false;
    for (FormalParam p : fc.getParams()) {
View Full Code Here


    @Override
    public void render(RenderContext r) {
      List<? extends CssTree> children = children();
      TokenConsumer tc = r.getOut();
      tc.mark(getFilePosition());
      if (!children.isEmpty()) {
        tc.mark(children.get(0).getFilePosition());
      }
      tc.consume(typePrefix());
      // Make sure the token consumer sees a single identifier.
View Full Code Here

    public void render(RenderContext r) {
      List<? extends CssTree> children = children();
      TokenConsumer tc = r.getOut();
      tc.mark(getFilePosition());
      if (!children.isEmpty()) {
        tc.mark(children.get(0).getFilePosition());
      }
      tc.consume(typePrefix());
      // Make sure the token consumer sees a single identifier.
      tc.consume(suffixedIdentifier(suffix()));
    }
View Full Code Here

        return false;
      }
    }
    public void render(RenderContext r) {
      TokenConsumer out = r.getOut();
      out.mark(getFilePosition());
      out.consume("url");
      out.consume("(");
      String url;
      try {
        url = UriUtil.normalizeUri(getValue());
View Full Code Here

        url = UriUtil.normalizeUri(getValue());
      } catch (URISyntaxException ex) {
        url = "data:,";
      }
      renderCssString(url, r);
      out.mark(FilePosition.endOfOrNull(getFilePosition()));
      out.consume(")");
    }
  }

  /**
 
View Full Code Here

      super.childrenChanged();
      assert 1 == children().size() && (children().get(0) instanceof Expr);
    }
    public void render(RenderContext r) {
      TokenConsumer out = r.getOut();
      out.mark(getFilePosition());
      renderCssIdent(name.getCanonicalForm(), r);
      out.consume("(");
      children().get(0).render(r);
      out.mark(FilePosition.endOfOrNull(getFilePosition()));
      out.consume(")");
View Full Code Here

      TokenConsumer out = r.getOut();
      out.mark(getFilePosition());
      renderCssIdent(name.getCanonicalForm(), r);
      out.consume("(");
      children().get(0).render(r);
      out.mark(FilePosition.endOfOrNull(getFilePosition()));
      out.consume(")");
    }
  }

  /**
 
View Full Code Here

  @Override
  public boolean isTargetForContinue() { return false; }

  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 Object getValue() { return null; }

  public void render(RenderContext rc) {
    TokenConsumer out = rc.getOut();
    out.mark(getFilePosition());
    out.consume("catch");
    out.consume("(");
    out.mark(exception.getFilePosition());
    exception.getIdentifier().render(rc);
    out.consume(")");
View Full Code Here

  public void render(RenderContext rc) {
    TokenConsumer out = rc.getOut();
    out.mark(getFilePosition());
    out.consume("catch");
    out.consume("(");
    out.mark(exception.getFilePosition());
    exception.getIdentifier().render(rc);
    out.consume(")");
    body.renderBlock(rc, false);
  }
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.