Package railo.transformer.bytecode.expression

Examples of railo.transformer.bytecode.expression.Expression


  /**
   * @see railo.transformer.data.cfml.expression.data.cfmlExprTransformer#expression()
   */
  public final Expression expression(ExprData data) throws TemplateException {
    Expression expr;
    expr = super.expression(data);
    comments(data);
    return expr;
  }
View Full Code Here


    while(ps.isValidIndex() && ps.isCurrentWhiteSpace()){
      if(ps.getCurrent()=='\n')
        return new Attribute(true,name,LitBoolean.TRUE,"boolean");
      ps.next();
    }
    Expression value = paramValue(ps);
    return new Attribute(true,name, value,value instanceof LitBoolean?"boolean":"string");
  }
View Full Code Here

 
  public void transform(Page page,CFMLTransformer parent, EvaluatorPool ep,FunctionLib[] flibs, Tag tag, TagLibTag tagLibTag,TagLibTag[] scriptTags, CFMLString cfml,TransfomerSettings settings)
  throws TemplateException {
    Attribute attr = tag.getAttribute("language");
    if(attr!=null) {
      Expression expr = CastString.toExprString(attr.getValue());
      if(!(expr instanceof LitString))
        throw new TemplateException(cfml,"Attribute language of the Tag script, must be a literal string value");
      String str = ((LitString)expr).getString().trim();
      if("java".equalsIgnoreCase(str))    jst.transform(page,parent, ep, flibs, tag, tagLibTag,scriptTags, cfml,settings);
      else if("cfml".equalsIgnoreCase(str))  cst.transform(page,parent, ep, flibs, tag, tagLibTag,scriptTags, cfml,settings);
View Full Code Here

  public void evaluate(Tag tag,TagLibTag tagLibTag,FunctionLib[] flibs) throws EvaluatorException {
        String id="sprite_"+IDGenerator.intId();
        try {
      Page page = ASMUtil.getAncestorPage(tag);
      String key=Md5.getDigestAsString(Thread.currentThread().getId()+":"+page.getSource());
      Expression src = tag.getAttribute("src").getValue();
     
     
      // get data from previous sprites
      Previous previous = sprites.get(key);
      if(previous!=null) {
View Full Code Here

 

  public void visit(ExpressionStmt n, Object arg) {
    super.visit(n, arg);
    DataBag db=toDataBag(arg);
    Expression e=(Expression) db.rtn.pop();
   
   
    body.addStatement(new ExpressionAsStatement(e));
    db.rtn.clear();
  }
View Full Code Here

     
    List<String> arr=new ArrayList<String>();
    if(var.getScope()!=Scope.SCOPE_UNDEFINED)arr.add(ScopeFactory.toStringScope(var.getScope(),"undefined"));
    Iterator it = members.iterator();
    DataMember dm;
    Expression n;
    while(it.hasNext()) {
      Object o = it.next();
      if(!(o instanceof DataMember)) throw new BytecodeException("can't translate Variable to a String",var.getStart());
      dm=(DataMember) o;
      n=dm.getName();
View Full Code Here

          adapter.loadArg(2);
        div.visitEQ();
          adapter.push(count++);
        div.visitEnd(bc);
      cv.visitWhenAfterExprBeforeBody(bc);
        Expression defaultValue = arg.getDefaultValue();
        if(defaultValue!=null) {
          /*if(defaultValue instanceof Null) {
            adapter.invokeStatic(NULL, GET_INSTANCE);
          }
          else*/
          defaultValue.writeOut(bc, Expression.MODE_REF);
        }
        else
          adapter.loadArg(DEFAULT_VALUE);
          //adapter.visitInsn(Opcodes.ACONST_NULL);
        adapter.returnValue();
View Full Code Here

    else adapter.push("");
   
    // hint
    attr = component.removeAttribute("hint");
    if(attr!=null) {
      Expression value = attr.getValue();
      if(!(value instanceof Literal)){
        value=LitString.toExprString("[runtime expression]");
      }
      ExpressionUtil.writeOutSilent(value,bc, Expression.MODE_REF);
    }
View Full Code Here

     * @param args Container zum Speichern einzelner Attribute Namen zum nachtr¦glichen Prufen gegen die Tag-Lib.
     * @return Element Attribute Element.
     * @throws TemplateException
     */
    private static Attribute attribute(TagData data,TagLibTag tag, ArrayList<String> args,RefBoolean allowDefaultValue) throws TemplateException {
      Expression value=null;
     
      // Name
      StringBuffer sbType=new StringBuffer();
      RefBoolean dynamic=new RefBooleanImpl(false);
      boolean isDefaultValue=false;
View Full Code Here

   * @param isNonName
   * @return Element Eingelesener bersetzer Wert des Attributes.
   * @throws TemplateException
   */
  public static Expression attributeValue(TagData data,TagLibTag tag, String type,boolean parseExpression,boolean isNonName, Expression noExpression) throws TemplateException {
    Expression expr;
    try {
      ExprTransformer transfomer=null;
      if(parseExpression){
          transfomer = tag.getTagLib().getExprTransfomer();
      }
View Full Code Here

TOP

Related Classes of railo.transformer.bytecode.expression.Expression

Copyright © 2018 www.massapicom. 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.