public Expression string(Factory f,SourceCode cfml) throws TemplateException {
  cfml.removeSpace();
  char quoter=cfml.getCurrentLower();
  if (quoter != '"' && quoter != '\'')   return null;
  StringBuffer str=new StringBuffer();
  boolean insideSpecial=false;
  Position line=cfml.getPosition();
  while (cfml.hasNext()) {
    cfml.next();
    if (cfml.isCurrent(specialChar)) {
      insideSpecial=!insideSpecial;
      str.append(specialChar);
    }
 else     if (!insideSpecial && cfml.isCurrent(quoter)) {
      if (cfml.isNext(quoter)) {
        cfml.next();
        str.append(quoter);
      }
 else {
        break;
      }
    }
 else {
      str.append(cfml.getCurrent());
    }
  }
  if (!cfml.forwardIfCurrent(quoter))   throw new TemplateException(cfml,"Invalid Syntax Closing [" + quoter + "] not found");
  LitString rtn=f.createLitString(str.toString(),line,cfml.getPosition());
  cfml.removeSpace();
  return rtn;
}

public Expression string ( Factory f , SourceCode cfml ) throws TemplateException { cfml . removeSpace ( ) ; char quoter = cfml . getCurrentLower ( ) ; if ( quoter != '"' && quoter != '\'' ) return null ; StringBuffer str = new StringBuffer ( ) ; boolean insideSpecial = false ; Position line = cfml . getPosition ( ) ; while ( cfml . hasNext ( ) ) { cfml . next ( ) ; if ( cfml . isCurrent ( specialChar ) ) { insideSpecial = ! insideSpecial ; str . append ( specialChar ) ; } else if ( ! insideSpecial && cfml . isCurrent ( quoter ) ) { if ( cfml . isNext ( quoter ) ) { cfml . next ( ) ; str . append ( quoter ) ; } else { break ; } } else { str . append ( cfml . getCurrent ( ) ) ; } } if ( ! cfml . forwardIfCurrent ( quoter ) ) throw new TemplateException ( cfml , "Invalid Syntax Closing [" + quoter + "] not found" ) ; LitString rtn = f . createLitString ( str . toString ( ) , line , cfml . getPosition ( ) ) ; cfml . removeSpace ( ) ; return rtn ; }
liest den string ein
