Package railo.transformer.bytecode.expression

Examples of railo.transformer.bytecode.expression.Invoker


   
   
   

      String name=null;
      Invoker invoker=null;
    // Loop over nested Variables
    while (data.cfml.isValidIndex()) {
      ExprString nameProp = null,namePropUC = null;
      // .
      if (data.cfml.forwardIfCurrent('.')) {
        // Extract next Var String
                comments(data);
                Position line=data.cfml.getPosition();
                name = identifier(data,true);
        if(name==null)
          throw new TemplateException(data.cfml, "Invalid identifier");
                comments(data);
        nameProp=Identifier.toIdentifier(name,line,data.cfml.getPosition());
        namePropUC=Identifier.toIdentifier(name,data.settings.dotNotationUpper?Identifier.CASE_UPPER:Identifier.CASE_ORIGNAL,line,data.cfml.getPosition());
      }
      // []
      else if (data.cfml.forwardIfCurrent('[')) {
       
        // get Next Var
        nameProp = structElement(data);
        namePropUC=nameProp;
        // Valid Syntax ???
        if (!data.cfml.forwardIfCurrent(']'))
          throw new TemplateException(
            data.cfml,
            "Invalid Syntax Closing []] not found");
      }
      /* / :
      else if (data.cfml.forwardIfCurrent(':')) {
        // Extract next Var String
                comments(data);
                int line=data.cfml.getLine();
        name = identifier(true,true);
        if(name==null)
          throw new TemplateException(cfml, "Invalid identifier");
                comments(data);
               
        nameProp=LitString.toExprString(name,line);
      }*/
      // finish
      else {
        break;
      }

            comments(data);
           
            if(expr instanceof Invoker)  {
              invoker=(Invoker) expr;
            }
            else {
              invoker=new ExpressionInvoker(expr);
              expr=invoker;
            }
      // Method
      if (data.cfml.isCurrent('(')) {
        if(nameProp==null && name!=null)nameProp=Identifier.toIdentifier(name, Identifier.CASE_ORIGNAL,null,null);// properly this is never used
        invoker.addMember(getFunctionMember(data,nameProp, false));
      }
     
      // property
      else invoker.addMember(new DataMember(namePropUC));
     
    }
   
    return expr; 
  }
View Full Code Here

TOP

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

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.