Package railo.transformer.bytecode.literal

Examples of railo.transformer.bytecode.literal.LitBoolean


      comments(data);
      if(!data.cfml.forwardIfCurrent('('))
        throw new TemplateException(data.cfml,"invalid syntax in function head, missing begin [(]");
   
      // arguments
      LitBoolean passByRef;
      Expression displayName;
      Expression hint;
      Map<String,Attribute> meta;
      String _name;
      do  {
View Full Code Here


          Boolean r=((Literal) right).getBoolean(null);
         
         
          if(l!=null && r!=null) {
            switch(operation) {
            case AND:  return new LitBoolean(l.booleanValue()&&r.booleanValue(),left.getStart(),right.getEnd());
            case OR:  return new LitBoolean(l.booleanValue()||r.booleanValue(),left.getStart(),right.getEnd());
            case XOR:  return new LitBoolean(l.booleanValue()^r.booleanValue(),left.getStart(),right.getEnd());
            }
          }
        }
        return new OpBool(left,right,operation);
    }
View Full Code Here

     */
    public static ExprBoolean toExprBoolean(Expression expr, Position start, Position end) {
        if(expr instanceof Literal) {
          Boolean b=((Literal) expr).getBoolean(null);
          if(b!=null) {
            return new LitBoolean(!b.booleanValue(),start,end);
          }
        }
        return new OpNegate(expr,start,end);
    }
View Full Code Here

        comments(data);
   
    // Boolean constant
    if(id.getString().equalsIgnoreCase("TRUE"))  {// || name.equals("YES"))  {
      comments(data);
      return new LitBoolean(true,line,data.cfml.getPosition());
    }
    else if(id.getString().equalsIgnoreCase("FALSE"))  {// || name.equals("NO"))  {
      comments(data);
      return new LitBoolean(false,line,data.cfml.getPosition());
    }
    else if(NullSupportHelper.full() && id.getString().equalsIgnoreCase("NULL"))  {
      comments(data);
      return new Null(line,data.cfml.getPosition());
    }
View Full Code Here

    attr = tag.removeAttribute("default");
    Expression defaultValue = (attr == null) ? null : attr.getValue();
   
    // passby
    attr = tag.removeAttribute("passby");
    LitBoolean passByReference = LitBoolean.TRUE;
    if(attr!=null) {
      // i can cast irt to LitString because he evulator check this before
       String str = ((LitString)attr.getValue()).getString();
       if(str.trim().equalsIgnoreCase("value"))
         passByReference=LitBoolean.FALSE;
View Full Code Here

     */
    public static ExprBoolean toExprBoolean(Expression expr)  {
        if(expr instanceof ExprBoolean) return (ExprBoolean) expr;
        if(expr instanceof Literal) {
            Boolean bool = ((Literal)expr).getBoolean(null);
            if(bool!=null) return new LitBoolean(bool.booleanValue(),expr.getStart(),expr.getEnd());
            // TODO throw new TemplateException("can't cast value to a boolean value");
        }
        return new CastBoolean(expr);
    }
View Full Code Here

TOP

Related Classes of railo.transformer.bytecode.literal.LitBoolean

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.