Ejemplo n.º 1
0
  private void expr() {
    if (!finalPass) return;

    LOG.debug("parse: expr");

    String text = scan.getToken().trim();
    text = getExpressionText(text);
    if (text != null && text.length() > 2 && text.startsWith("(") && text.endsWith(")")) {
      out.printlnToResponse(
          GroovyPage.EXPRESSION_OUT_STATEMENT, text.substring(1, text.length() - 1));
    } else {
      out.printlnToResponse(GroovyPage.EXPRESSION_OUT_STATEMENT, text);
    }
  }
Ejemplo n.º 2
0
 /**
  * Write to the outputstream ONLY if the string is not blank, else we hold it back in case it is
  * to be swallowed between tags
  */
 @SuppressWarnings("unused")
 private void bufferedPrintlnToResponse(String s) {
   if (currentlyBufferingWhitespace) {
     whitespaceBuffer.append(s);
   } else {
     flushTagBuffering();
     out.printlnToResponse(s);
   }
 }
Ejemplo n.º 3
0
  private void scriptletExpr() {
    if (!finalPass) {
      return;
    }

    LOG.debug("parse: expr");

    String text = scan.getToken().trim();
    out.printlnToResponse(text);
  }